CIS 220 Programming Assignment 4 solution


Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment


5/5 - (4 votes)

CIS 220 – Programming PrinciplesDr. Weber
Programming Assignment 4 –(10 points possible)OBJECTIVEProgramming Assignment 4 illustrates the creaTon of user-deFned classes in the VisualC# console environment. ±he program will demonstrate the use of a user-deFnedStudent class with private data members, mulTple (overloaded) constructors, andaccessor and mutator methods. SpeciFc objecTves are to develop skills with respect to:·CreaTng a new class·Coding overloaded constructors with mulTple parameters·Coding and calling instance methods (accessors/ge²ers andmutators/se²ers)·Proper internal documentaTon·CreaTng and using objects

DESCRIPTIONIn PA04, the programmer will create a Hardware class to hold the ID, manufacturer, andvalue of a piece of hardware. Code accessor and mutator methods for each of these 3local private variables. Code one default constructor and one constructor that acceptsmanufacturer, ID, and value as parameters.In the Main() method of the HardwareApp class, call a staTc method to display a Ttle asseen above. Prompt the user for a manufacturer, ID, and price of a new piece ofhardware. InstanTate an instance of the Hardware class. Call a staTc method to displaythe informaTon, using accessor methods to retrieve the informaTon. Format the outputstring as seen in the sample output, using escape sequences as needed.Depreciate the value of both pieces of hardware and then display their informaTonagain.Call a staTc method that will prompt the user to press any key to terminate the program.Class diagrams have been provided as a planning tool, however your variables andmethods may be named di±erently, as long as they are descripTve and follow namingconvenTons.DIRECTIONS1.Create a new project2.Project ²ype (Visual C#)3.²emplate (Console ApplicaTon)4.Name (PA04LastNameFirstIniTal)5.Rename the Program.cs ³le to HardwareApp.cs6.Add a second class to your project called Hardware.cs (Project/Add Class)7.Include your name, the course and secTon, the class ³le name, and a briefdescripTon of the class (in that order) in a mulT-line comment at the top of everyclass8.Include internal documentaTon using inline comments as appropriate9.When completely ³nished and ready for grading, add your full soluTon folder tothe J: drive, then a´ach both class ³lesand click the Submit bu´on in Bb Learnprior to the deadline