1. Homepage
  2. Programming
  3. Assignment: Classes and Inheritance - Appliances Management System

Assignment: Classes and Inheritance - Appliances Management System

Engage in a Conversation
CanadaSAITSouthern Alberta Institute of TechnologyClasses and InheritanceC#CSharp

Assignment: Classes and Inheritance
CourseNana.COM

Scenario

A local company, Modern Appliances, has hired you to implement a system to manage their appliance data more efficiently. They want a system that allows both employees and customers to find, list and purchase appliances. CourseNana.COM

They company has provided you with a data file containing a sample list of appliances. The data file contains four types of appliances: refrigerators, vacuums, microwaves and dishwashers. Each appliance is uniquely identified using an item number, and information about each type of appliance is described in the formatting section. CourseNana.COM

Equipment and Materials

For this assignment, you will need: CourseNana.COM

·       Visual Studio IDE CourseNana.COM

·       Supplied data file: appliances.txt CourseNana.COM


CourseNana.COM

Instructions

1.      Review the scenario, and then carefully read the Appliance Details and Program Guidelines sections of this document. CourseNana.COM

2.      Working outside of class time, complete the submission sections of this assignment. CourseNana.COM

3.      Review the grading criteria for the group submissions. CourseNana.COM

4.      See the course schedule and/or Brightspace for due dates. CourseNana.COM

  CourseNana.COM

Submission CourseNana.COM

Complete the partial class diagram provided in Figure 1 below so that it accurately represents the design of the program. CourseNana.COM

1.      Create the code for a program that meets the requirements described below. CourseNana.COM

2.      Test your code against the expected output provided. CourseNana.COM

3.      Check your program against the detailed marking criteria at the end of this document. CourseNana.COM

4.      Submit the following to Brightspace as a group (Only one copy is required per group, and any of the group members may submit): CourseNana.COM

·     GitHub URL for your program code (invite your instructor to be a member of the project repository) CourseNana.COM

·     A copy of the test output (.txt file) CourseNana.COM

Peer Assessment (5%) CourseNana.COM

Each student must also complete a peer assessment of their group members. Your instructor will provide further submission details. CourseNana.COM

Appliance Details

Data Formatting

·       Each of the following appliance types is represented differently in the supplied appliances.txt file. CourseNana.COM

·       Each line in the file represents a different appliance and each piece of information for an appliance is separated by a semi-colon. CourseNana.COM

·       The first digit of the Item Number indicates the type of the appliance. Each item number is 9 digits long. CourseNana.COM

Refrigerators CourseNana.COM

·       The first digit of the Item Number for refrigerators is 1. CourseNana.COM

·       Refrigerators have an Item Number, Brand, Quantity, Wattage, Color, Price, Number of Doors, Height and Width (in inches). CourseNana.COM

·       The number of doors value can be either 2 (double doors), 3 (three doors) or 4 (four doors). CourseNana.COM

·       Each refrigerator is represented in the appliances.txt file file as follows: CourseNana.COM

ItemNumber;Brand;Quantity;Wattage;Color;Price;NumberOfDoors;Height;Width CourseNana.COM

Example: CourseNana.COM

089360200;Bosch;176;60;black;2000;2;62;29; CourseNana.COM

Vacuums CourseNana.COM

·       The first digit of the Item Number for vacuums is 2. CourseNana.COM

·       Vacuums have an Item Number, Brand, Quantity, Wattage, Color, Price, Grade and Battery Voltage. CourseNana.COM

·       The Battery voltage value can be either 18 V (Low) or 24 V (High). CourseNana.COM

·       Each vacuum is represented in the appliances.txt file as follows: CourseNana.COM

ItemNumber;Brand;Quantity;Wattage;Color;Price;Grade;BatteryVoltage CourseNana.COM

Example: CourseNana.COM

263788832;Hoover;59;600;black;750;Residential;18; CourseNana.COM

Microwaves CourseNana.COM

·       The first digit of the Item Number for microwaves is 3. CourseNana.COM

·       Microwaves have an Item Number, Brand, Quantity, Wattage, Color, Price, Capacity and Room Type. CourseNana.COM

·       The room type is where the microwave will be installed, and is either K (kitchen) or W (work site) CourseNana.COM

·       Each microwave is represented in the appliances.txt file as follows: CourseNana.COM

ItemNumber;Brand;Quantity;Wattage;Color;Price;Capacity;RoomType CourseNana.COM

Example: CourseNana.COM

383477937;Miele;201;2350;white;179.9;1.8;Kitchen; CourseNana.COM

Dishwashers CourseNana.COM

·       The first digit of the Item Number for dishwashers is 4 or 5. CourseNana.COM

·       Dishwashers have an Item Number, Brand, Quantity, Wattage, Color, Price, Sound Rating, and Feature. CourseNana.COM

·       The Sound Rating of the dishwasher can be Qt (Quietest), Qr (Quieter), Qu (Quiet) or M (Moderate). CourseNana.COM

·       Each dishwasher is represented in the appliances.txt file as follows: CourseNana.COM

ItemNumber;Brand;Quantity;Wattage;Color;Price;Feature;SoundRating CourseNana.COM

Example: CourseNana.COM

587065284;Kenwood;74;1010;silver;390;Clean with Steam;Qu; CourseNana.COM

Program Guidelines

The fact that the data formatting is different for each type of appliance adds a level of complexity to program development. Creating a class hierarchy is required: CourseNana.COM

·       Determine the attributes that are shared between the appliance types and create an Appliance class containing them. CourseNana.COM

Note: The Appliance class cannot be instantiated and must be a super-class. CourseNana.COM

·       Create the following classes such that each one inherits the Appliance class and is located in the program’s ProblemDomain folder: CourseNana.COM

o   Refrigerator CourseNana.COM

o   Vacuum CourseNana.COM

o   Microwave CourseNana.COM

o   Dishwasher CourseNana.COM

·       Ensure that each of these classes has a user-defined constructor that assigns the appropriate attributes. CourseNana.COM

·       Override the ToString() method in each one of these classes, so that the data is in a human readable format. CourseNana.COM

·       The attributes should be displayed using vertical headers.  CourseNana.COM

Along with the functionality mentioned above, include the following methods in your program: CourseNana.COM

·       A method that parses the appliances.txt file into a single list. CourseNana.COM

o   The list must be able to contain all appliance types (refrigerator, vacuum, microwave, and dishwasher). CourseNana.COM

o   Use the first digit of the item number to determine what valid type of appliance needs to be created (see the Appliance Details section for more information). CourseNana.COM

·       A method that allows a customer to purchase an appliance. CourseNana.COM

o   The customer is prompted to enter the item number of an appliance. If the entered item number does not match, the program will inform the customer with an error message. If the item number matches, the program checks the appliance’s availability. If there is an appliance available, the available count will be decremented and the appliance information will be displayed. Otherwise, the customer will be informed the appliance is not available. CourseNana.COM

·       A method that prompts the customer to enter a brand. The program performs a case-insensitive search of appliances that have the same brand, and displays them. CourseNana.COM

·       A method that prompts a user to enter a number, and the program then displays that number of random appliances. The appliances can be of any type. CourseNana.COM

·       When the program exits, implement and call a method that takes the appliances stored in the list and persists them back to the appliances.txt file in the proper format. CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
Canada代写,SAIT代写,Southern Alberta Institute of Technology代写,Classes and Inheritance代写,C#代写,CSharp代写,Canada代编,SAIT代编,Southern Alberta Institute of Technology代编,Classes and Inheritance代编,C#代编,CSharp代编,Canada代考,SAIT代考,Southern Alberta Institute of Technology代考,Classes and Inheritance代考,C#代考,CSharp代考,Canadahelp,SAIThelp,Southern Alberta Institute of Technologyhelp,Classes and Inheritancehelp,C#help,CSharphelp,Canada作业代写,SAIT作业代写,Southern Alberta Institute of Technology作业代写,Classes and Inheritance作业代写,C#作业代写,CSharp作业代写,Canada编程代写,SAIT编程代写,Southern Alberta Institute of Technology编程代写,Classes and Inheritance编程代写,C#编程代写,CSharp编程代写,Canadaprogramming help,SAITprogramming help,Southern Alberta Institute of Technologyprogramming help,Classes and Inheritanceprogramming help,C#programming help,CSharpprogramming help,Canadaassignment help,SAITassignment help,Southern Alberta Institute of Technologyassignment help,Classes and Inheritanceassignment help,C#assignment help,CSharpassignment help,Canadasolution,SAITsolution,Southern Alberta Institute of Technologysolution,Classes and Inheritancesolution,C#solution,CSharpsolution,