Using C# code only (not XML or database) solve thefollowing.
Will give thumps up and review.Thanks.
Your company was asked to build a contact manager for a grocery store, the software architects of your company have designed the system and your supervisor has assigned the task of coding four classes. A sample output is provided at the end of this document. You must match the format of the output as close as possible. Do not use the class diagram below or even the UML object diagram to develop your code. Please read the specification/description of each type including all the members before starting to implement the system. It is recommended that you implement each type in the order that they are specified. Customer Class → StorePerson Properties Store Person Abstract Class Credit (get): double Methods Fields ID: int Properties Cell (get): string Id (get): string Name (get): string Methods StorePerson(string name, string .... Customer(string name, string cell... ToString(): string Employee Class → Store Person Store Static Class Properties > Salary (get): double Methods Fields people: List Methods Save(string filename) : void Show():void → Show(double amount) : void → Show(int length) : void → Show(string name) : void Store) Ⓒ Employee(string name, string cell... ToString(): string Warning: You may not use ANY techniques that was not covered in COMP123 so far.
The StorePerson class The StorePerson class is abstract and is described in the diagram below. StorePerson abstract class Fields $# ID Properties + «property, no setter» Cell + «property, no setter » Name + «> Id Methods + «constructor»> StorePerson name : string, cell : string) : int = 100_000 : string : string : string Description of class members Fields: There is a single static field that is decorated with the protected modifier. ID- this int field represents the id of the next customer or employee to be created. This is used in the constructor to generate sequential id for objects. It is initialized to 100_000 at declaration. Properties: There are three properties. The getters are public, and the setters are absent. Cell-this string property represents the cell number of this store person. Name - this string property represents the name of this store person. Id- this string property represents the species of this animal. Constructor: StorePerson(string name, string cell) - This constructor takes two arguments and does the following: 1. Assigns the arguments to the appropriate properties. 2. Assigns a string version of the static field ID to the property Id. 3. Increments the static field ID.
Methods: There are no methods.
The Customer class The Pet class inherits from the Animal class and is described in the diagram below. Customer class → StorePerson Fields Properties + «
Using C# code only (not XML or database) solve the following. Will give thumps up and review. Thanks.
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am