Define a class called Product that has: Read-only properties (you may use backing fields and properties or just auto

Class Definition: Define a class called Product that has:
 Read-only properties (you may use backing fields and properties or just auto-properties) for
ProductName (string) and PricePerUnit (double). These read-only properties are set when
each instance/object of the class is created and cannot be changed after that.
 In addition to these properties, there is a property called Quantity (int) that corresponds to
the number of units ordered for this particular product, which may be changed later.
 A property called ProductTotalBeforeTax (double) is a computed read-only property,
which will return the total before taxes for that product given PricePerUnit (double0 and
Quantity by multiplying the two properties.
 A property called ProductTax (double), which is a computed read-only property and
computed as 8% of the ProductTotalBeforeTax.
 Finally, another read-only computed property, ProductTotalAfterTax (double) is computed
as sum of ProductTotalBeforeTax and ProductTax.
The class must contain needed constructors, and an over-ridden ToString() method to display each
product details of ProductName, PricePerUnit, Quantity and ProductTotalBeforeTax, ProductTax,
ProductTotalAfterTax. You need to do background research and look up how to use String.Format()
method to return a formatted string instead of directly displaying the formatted string on the console

Main Program:
1. In the main method, create 3 instances or objects of Product by setting ProductName and
PricePerUnit for each of these objects to any name and unit price of your choice. Note that
the product names and corresponding price per unit for each of those three Product objects
are all your choice – e.g., ProductObject1 could have a ProductName “Disposable Masks
Pack” with PricePerUnit being $12.99 and so on). Note each of the three Product object
corresponds to three different product names, each with its own price per unit.
2. Then call the UpdateProductQty (see method definitions below) method three times each
time passing one of the three objects you have created. This method takes one Product
object as its parameter and updates the Quantity based on user input for that Product object
(e.g. method call for first Product object you have created would be
UpdateProductQty(product1)).
3. Once all product quantities have been updated, call the ChooseAction(product1, product2,
product3) method that is void returning and takes as input the three Product objects you have
created.
Method Definitions in the Main Program:
1. UpdateProductQty(Product anyProduct) static method in the main program: This is a
void method takes one Product object as its parameter and updates the Quantity based on
user input for that object.
a. This method displays the ProductName and Unit Price for that Product object and
prompts the user to enter number of units needed (product quantity) for that product.
b. Then, the Quantity of that Product object is updated based on user input (parse the
numeric input as needed). Note here that even though product1 is passed as an input
parameter, the Quantity for product1 can be updated inside the method because class
objects are reference data type, which means it is pass by reference by default.
2. ChooseAction(Product product1, Product product2, Product product3) static method
in the main program: This void method takes as input three Product objects as parameters.
It displays three action options for the user using a numbered input: Press 1 for View Cart,
Press 2 for Update Order and Press 3 for quitting the application.
a. When the user presses 1 (you need to get user input with Readline(), then parse it and
check if value == 1, note you need two == when checking if two values are equal in
an if statement), call the static method, ViewCart(product1, product2, product3)
that takes the three Product objects as arguments.
b. When the user presses 2, call UpdateCart(product1, product2, product3) method,
which also takes the three Product objects as parameters.
c. When the user presses 3, Clear your console output using Console.Clear( ) method,
and say “Thank you for placing an order with us. Good Bye!”.

3. ViewCart(Product product1, Product product2, Product product3) static method in
the main program: The ViewCart() void method takes the three Product objects as input
parameters:
a. Then, call the GetCartTotalsSummary(product1, product2, product3, out double
totalBeforeDiscount, out double discountAmount) to get the total of all three objects
before discount, total discount amount, and grand total after discount. See method
definition for GetCartTotalsSummary( ) below.
b. Display all the order details of the cart giving
i. each ProductName, PricePerUnit, Quantity, ProductTotalBeforeTax,
ProductTax, ProductTotalAfterTax. You can use ToString( ) method defined
in the class.
ii. totalBeforeDiscount, discount amount, and grand total after discount using an
output banner and formatted output.
iii. All monetary values must be formatted using the currency format specifier.
c. At the end of ViewCart() method, call the ChooseAction(product1, product2,
product3) method again to allow user to choose actions they want to take. Use some
form of formatted output to Display the results in a banner of your choice. You may
look up how to use String.Format( ) method to return a formatted string instead of
directly displaying the formatted string on the console.
4. GetCartTotalsSummary(Product product1, Product product2, Product product3, out
double totalBeforeDiscount, out double discountAmount) static method in the main
program that returns totalAfterDiscount: This method takes the three Product objects
and:
a. gets as out parameters the totalBeforeDiscount and discountAmount. The
totalBeforeDiscount is computed as sum of the ProductTotalAfterTax of the three
product objects. If the total amount before discount exceeds $100.00, then the
customer gets 10% off – the discountAmount is 10% of the totalBeforeDiscount.
b. returns as double the totalAfterDiscount (totalBeforeDiscount – discountAmount).
5. UpdateCart(Product product1, Product product2, Product product3) static method in
the main program: This method takes the three Product objects as input parameters.
a. It gives a number as options to update the quantities for each of the three product
names (e.g., Press 1 to update quantities for “Disposable Masks Pack”, 2 to update
quantities for <product name 2 – whatever name you choose>, and so on for the
three product names you chose).
b. Depending on what number the user has pressed, update the Quantity to the new
number the user has inputted for that product name (Product object), and display a
message saying quantities updated for that product.
c. Note that the user can only update quantities for one Product object at a time. At the
end of UpdateCart() method, call the ChooseAction(product1, product2, product3)
method again to allow user to choose actions they want to take.

Get 20% Discount on This Paper
Pages (550 words)
Approximate price: -

Try it now!

Get 20% Discount on This Paper

We'll send you the first draft for approval by at
Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

Ace Writing Center has stood as the world’s leading custom essay writing services providers. Once you enter all the details in the order form under the place order button, the rest is up to us.

Essays

Essay Writing Services

At Ace Writing Center, Nowadays, students normally have extremely busy schedules. You will note that some of them have to take on some evening or weekend jobs in order to get some income that can help them to sustain in college or in the university. This can deny them a chance to write all the essays given. Others usually get bombarded with a lot of work by their lecturers. This can still delay such students from working on all their essays. However, some of them usually try to work on all these essays but end up delivering their work late. This can prevent them from graduating since most lecturers are strict on deadlines. If you want to write a business essay, the wise way is to hire an outstanding essay writing service like us, so that you can get the best results. If you are keen, you will note that many companies usually overcharge their customers. Some of them are there only to make money. And in reality, they really don’t care to build a long term commitment with students. You should not choose such companies. You should take your time and choose a reliable company to work with. Ace Writing Center is the ultimate solution for you. We have been offering our writing service for more than 7 years. This is a clear indication that you will get quality essay writing service. We have a wide range of writers who can work on any business essay that you might have. We believe in doing extensive research so that we can provide quality work to all our clients. .

Admissions

Admission and Business Papers

Have you ever had to write an admission essay for college? The majority of students face the same issues when applying to a university or college and many in such situations decide they need professional help to cope with this matter. They get in a situation when the deadline keeps coming closer but lack motivation to start because they are just not sure if their writing skills are strong enough. We have a solution for you! Ace Writing Center is the best admission essay writing service with a large professional team and years of experience in providing high-quality papers to students of all levels and faculties. The mission of our team is to help students make their dreams of entering a good college come true and that’s what we offer!.

Editing

Editing and Proofreading

Sometimes all the words for your paper just flow out of your mind and into your fingers. You type quickly at your keyboard and there they are, your beautiful words right there on the screen. But you have no idea how to polish it up. You may be wishing there was a paper writing service that offered this type of writing service. Look no more! Here at Ace Writing Center, we offer you an editing and proofreading option that you can't find anywhere else..

Coursework

College Essay Writing

In case you are familiar Ace Writing Center, you know the way to distinguish a better company from a cheap one exactly. First of all, poor service website does not have a sufficient support. We think support team is an essential part of success; it has to answer all clients’ questions and be a connecting link between clients and their writers. On our web-service you will get answers about anything you need and your writer will receive all your instructions, assignments and requirements exactly and swiftly. A writing service that we run has got a flexible pricing system that will save you from senseless wastes and many bonus systems that let you sparing money for something important for you.