Answered step by step
Verified Expert Solution
Question
1 Approved Answer
this language is C# Please note that the numbers in the square brackets [] before the task you are required to do is the number
this language is C#
Please note that the numbers in the square brackets [] before the task you are required to do is the number of points rewarded for the task if done correctly. The maximum number of points is 25. [2] Create a console application called "CartDemo" and add two classes in it: Product and ShoppingCart. You are provided with the content of the "Program.cs" file in the console application. Just click this link to download it. You must use it exactly as is. The class diagrams are shown below. Make sure that your classes conform to them exactly. [2] Create Product class. Product Class Fields basePrice : double price : double :int stockQuantity : int Properties + Name : string + set absent Price : double + set absent> SKU + StockQuantity int Methods + constructor Course (sku: int, stockQuantity: int, basePrice: double) + ToString() string Create the following class members: [1] basePrice is a private read only field representing the base price of the product [1] price is the private field representing current product. It is the dependent on the stock quantity of the product. If the quantity is less then 1000 the current price is 110% of base price, otherwise it is equal to base price. [1] stockQuantity is private field representing the quantity of the product in stock [3] StockQuantity is property that is accessor to stockQuantity field. [1] Name is property representing the name of the product. [1] SKU is read only property representing the stock keep number of the product. [1] Price is read only property that is accessor for price field. [2] A constructor with three parameters: SKU number, number of products in stock, and base price. It assigns them to appropriate members. [1] Create ShoppingCart class Shopping Cart Class Fields cartValue : double Properties + set absent CartValue double + set absent Id : int + set absent> Products : ListStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started