Task: In this assignment, you are required to implement a C# application for a digital photo ordering system (something similar to a simple version of photolabs in London Drugs). The user will be able to place an order for prints of three different sizes and counts for each of those sizes. You can choose any THREE print sizes of your choice (e.g. 4" X 6", 5" X 7" etc.). You must user appropriate data types and names for identifiers.
Class Definition: Define a class called Photo Print that has read-only properties (with corresponding backing fields or using auto-properties) for Width, Length, and SizeName (e.g., "4 X 6"), and UnitPrice. These read-only properties are all set when each instance of the class is created and cannot be changed further. In addition to these properties, there is a property called Count, which may be changed later. Finally, a property called Sub Total is a computed read-only which will return the total for each print size given unit price and count for that size. The class must contain needed overloaded constructor methods, and an over-ridden ToString() method to display each print size details of SizeName, UnitPrice, Count and Sub Total. You may create any additional methods as you see fit.
Main Program:
1. In the main method, create 3 instances of PhotoPrint by setting the Width, Length and SizeName and UnitPrice (the three print sizes and corresponding unit price for each of those sizes are all your choice).
2. Then call the Get NumberOfPrints FromUser (see method definitions below) method three times each time passing one of the three instances you have created. This method takes one Photo Print class instance as its parameter and updates the count based on user input.
3. Once all print size counts have been updated, call the Perform UserAction method that is void returning and takes as input the three instances of PhotoPrint you have created.
Method Definitions in the Main Program (you may use Parse or TryParse methods):
1. GetNumberOfPrints FromUser() static method in the main program: This method takes one Photo Print class instance as its parameter and updates the count based on user input. This method displays the SizeName and Unit Price for the PhotoPrint class arameter and prompts the user to enter number of prints needed for that size Then, the count of the PhotoPrint instance is updated based on user input.
2. PerformUser Action() static method in the main program: This method takes as input the three instances of Photo Print. It displays three action options for the user using a numbered input: Press 1 for View Cart, Press 2 for Update Cart, and Press 3 for quitting the application.
a. When the user presses 1, call the static method, View Cart that takes the three instances of Photo Print as parameters
b. When the user presses 2, call UpdateCart() method, which also takes the three instances of Photo Print
c. When the user presses 3, Clear your console output and say "Thank you for placing an order with us". Use ReadKey to make sure we can see the Thank you message.
3. View Cart() static method in the main program: The ViewCart() method takes the three instances of Photo Print as input, for each of those three instances, display Size Name, UnitPrice, Count and Sub Total (by calling the ToString() method defined in the class) for each print size. Then call the ComputeOrderAmount() method that takes the three instances of Photo Print and gets as out parameters the total (before taxes and discount), taxes, discount amount, total (after taxes and discount). Display all the order details of the user giving each print size, count, print size subtotal, order total (before taxes), taxes, discount, and total (after taxes and discount) using an output banner and formatted output. At the end of ViewCart() method, call the Perform User Action method again to allow user to choose actions they want to take.
4. ComputeOrder Amount() static method in the main program: This method takes the three instances of Photo Print and gets as out parameter the total (before taxes and discount), taxes, discount amount, total (after taxes and discount). Based on the sub total for the three instances passed into the method, compute the Total for the cart by summing all the sub totals of the three print sizes, and then compute tax as 12% of the Total Amount (before any discount is applied). If the pre-tax total amount exceeds $50.00, then the customer gets a 5% discount on the pre-tax amount. All monetary values must be formatted using the currency format specifier.
5. UpdateCart() static method in the main program: This method takes the three instances of Photo Print. It a number set of options of all three sizes (Press 1 to update counts for 4 X 6, 2 to update counts for 5 X 7, and so on). Depending on what number the user has pressed, update the count to the new number the user has inputted for that size. Note that the user can only update one size at a time. At the end of ViewCart() method, call the PerformUser Action() method again to allow user to choose actions they want to take.