Question: Create a C# project ProductStore Application with a Product Class and a Program class as detailed below:Part A: Product class contains the following: 1 .

Create a C# project ProductStore Application with a Product Class and a Program class as detailed below:Part A: Product class contains the following:1. Two public static arrays that hold codes (categoryCodes) and descriptions of the popular Product categories (categoryNames) managed in a products store. These codes are a-, b-, f-, t-, o-, corresponding to product categories Apparel, Books, Foods, Toys, and Others. 2. Data fields for product id (productID) and product category name (productCategoryName)3. Auto-implemented properties that hold a products name (ProductName), products quantity (ProductQuantity) and products price (ProductPrice).4. Properties for product id and product category name. Assume that the set accessor will always receive a product id of a valid format that has length is 4, first letter is lowercase, second letter is a hyphen and ends with two digits. For example, a-11 and b-22 are of valid format and refer to known categories Apparel and Books. If the product id does not refer to a known category, then the set accessor must retain the number and assign to the o- category. For example, q-23 will be assigned as o-23. The product category name property is a read-only property that is assigned a value when the product id is set.5. Two constructors to create a Product object:- one with no parameter: public Product()- one with parameter for all data fields:public Product(string id, string name, int quantity, double price)6. A ToString method, public override string ToString(), to return all information of a product object.Part B: Program class contains the following:1. A method, public static void Display Introduction(), to display introduction of the project, including your last name, first name and student id in the display. All displayed information must be surrounded within a border of your choice.2. A Method, public static int InputValue(int min, int max), to input an integer number that is between (inclusive) the range of a lower bound and an upper bound. The method should accept the lower bound and the upper bound as two parameters and allow users to re-enter the number if the number is not in the range or a non-numeric value was entered. 3. A Method, public static bool CheckString (string id), to check if an input string satisfies the following conditions: the strings length is 4, the string starts with 1 lowercase character and one hyphen, and ends with 2 digits. For example, a-22 is a valid string, s_23 or A-1234 are not valid strings. 4. A Method, private static void GetProductData(Product[] products),to fill an array of products. The method must fill the array with products which are constructed from user input information (which must be prompted for). Along with the prompt for a product id, it should display a list of valid product categories and call method CheckString to make sure the inputted product id is a valid format. If not, the user is prompted to re-enter a valid product id.5. After the data entry is complete, write a Method, public static void DisplayAllProducts(Product[] products),to display information of all Products that have been entered including product id, product name, product category, product quantity and product price. This method must call the ToString method that has been created in Product class. 6. After the data entry is complete, write a Method, private static void GetProductLists(Product[] products),to display the valid product categories, and then continuously prompts the user for category codes and displays the information of all products in the category as well as the number of products in this category.Appropriate messages are displayed if the entered category code is not a valid code or there is no product in that category. 7. Write the Main method which will only contain calls to the other methods and the necessary variable declarations:(i) Call DisplayIntroduction() method to display introduction of the project and your information.(ii) Call the method InputValue to prompt the user for the number of Products that is between 1 and 30(inclusive).(iii) Then call method GetProductData create an array of Products.(iv) Then call method DisplayAllProducts to display all Products in the array.(v) Then call method GetProductLists to allow the user to input a category code and see the information of the category.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!