logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Brijesh AahujaEconomics
(5/5)

821 Answers

Hire Me
expert
Darshan MaheshwariEducation
(/5)

889 Answers

Hire Me
expert
Dawn WardManagement
(5/5)

575 Answers

Hire Me
expert
Jessee RossHistory
(5/5)

896 Answers

Hire Me
C Sharp Programming

C# and Visual Studio upload all files (NOT a project) to Canvas use Unit Testing to verify the functionality of class numGen

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Object-Oriented Development

 

For an acceptable P1 submission:

  1. use C# and Visual Studio
  2. upload all files (NOT a project) to Canvas
  3. use Unit Testing to verify the functionality of class numGen
  4. use Programming by Contract to specify contractual design, placing
    1. class and interface invariants at the top of cs file
    2. implementation invariant at the end of cs file
    3. pre & postonditions (if they exist) before each method header
  5. write readable code – see codingStd.docx in the PA folder under Files on Canvas
  6. employ the OOP tenets of abstraction, encapsulation and information hiding
  7. use functional decomposition => NO monolithic drivers
  8. document your driver:
    1. ProgrammingByContract NOT used for drivers
    2. DO NOT assume that the reader has access to this assignment specification
    3. provide an overview of your program
    4. explicitly state ALL assumptions
  9. do NOT hard code: replace arbitrary literals, such as ’42, with constants

 

Part  I: Class Design (numGen.cs)

Design an encapsulated numGen class.  Each numGen object encapsulates two different ‘gen’ numbers.  If active, an object returns a valid number.  If not active, zero is returned.  For example, with active numGen myObj that encapsulates 4 and 7 as its ‘gen’ numbers, successive client results are:

                        myObj.value();          // returns  4

                        myObj.value();          // returns  7

myObj.value();          // returns  -4

myObj.value();          // returns  -7 and is the end of cycle#1

myObj.value();          // returns  4 is the beginning of cycle#2

Every numGen object is initially active but transitions to inactive once the number of cycles equals the sum of the ‘gen’ numbers – in above example, 11 (4 + 7 = 11) values would be returned before the object becomes inactive.  The client may reset and revive a numGen object in addition to requesting values. An attempt to revive an active numGen object causes that object to be permanently deactivated.

Many details are missing.   You MUST make and DOCUMENT your design decisions!!

This assignment is an abstract realization of a data sink (store) that yields specific information upon query but can age and become invalid. With the interface described above, your design should encapsulate and control state as well as the release of information.    Do NOT tie your type definition to the Console.   

 

Use Unit Testing to verify your class functionality.  

 

Part II: Driver  (P1.cs) -- External Perspective of Client – tests your class design

Design a FUNCTIONALLY DECOMPOSED driver to demonstrate the program requirements.    

Use many distinct objects, initialized appropriately, i.e.  random distribution of numGens, etc.   

Adequate testing requires varied (random) input sufficient enough to yield objects in different states and the seamless alteration of the state of some objects. 

Make your output readable but not exceedingly lengthy.

.

 

 

Sample Grading:  Class Design (75 points)

Form (25 points)

Contractual Design                                                                                                    

            Interface and Implementation invariants

            Pre & Post conditions

Proper Accessibility (public, private)                                                                         

Appropriate functionality present in interface                                                         

Readable code (no hardcoding)                                                                        

 

Functionality ( 50 points )

Data Type implemented as required                                                     

clear, effective interface

minimal getSize() or the like

no dependencies on implementation exposed, etc.

Data members defined & manipulated as required                                      

            Effective representation of state

Constructor(s)                                                                                                    

put object in proper initial state

State transitions correct                                                                     

Unit Testing                                                                       

 

Sample Grading:  Driver (25 points)

Form (10 points)

Program overview                                                                                                 

PROGRAMMER name, date, revision history, platform, etc.

            Description of process(es) performed by program

Explanation of user interface (input, meaning of output)                                              

            Comments on use and validity (error processing)

Statement of assumptions                                                                        

Maintainable code (no hardcoding)                                                                        

Functionality ( 15 points ): Correlate to Documented Design Decisions

Requirements fulfilled – type tested appropriately                                                   

No unnecessary dependencies

User Interface (clear, correct & effective)                                                                  

Output (readable & consistent with design)

Random number generator used appropriately

File(s) manipulated appropriately                                                       

existence not assumed

read only once

closed after use

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme