Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C# code in visual studios Problem Description: The ACME Corporation would like you to develop an application that can be used to handle its sales
C# code in visual studios
Problem Description: The ACME Corporation would like you to develop an application that can be used to handle its sales transactions. As the application begins, it prompts for customer name, which is then used to print a welcome message. The application then prints the various products that the store offers along with their respective prices, and discount quantities as shown in the following screenshot: Please enter Customer Name: Salman Nazir Welcome, Salman Nazir, to ACME Corporation's Product Shop! Please choose from the following products by entering the product code followed by the quantity. Enter z. For this you will use null as the sentinel), as shown in screenshot below: Product Code: AD Quantity: 30 Product Code: AA Quantity: 20 Product Code: AM Quantity: 101 Product Code: AA Quantity: 47 Product Code: AC Quantity: 30 Product Code: Z If the user requests a product quantity equal to or greater than the discount quantity for that product, they get a 10% discount on the line total for that product. If a product is ordered multiple times, the quantities should be combined and the discount should be based on the total quantity ordered for that product. If a product is not ordered, it should not appear on the final invoice. When the user indicates that no more products are to be added, the program prints the customer name, the subtotals and the invoice total as shown in the screen shot below: Technical Specifications: - You will submit two classes, Transaction and TransactionTest. TransactionTest will drive the Transaction class. Class Transaction must have the following: - Instance variables: - A decimal variable, which will hold the transaction total. - A string variable, which will keep track of the individual items that the customer purchases. This will be eventually displayed on the screen. - An instance variable or a property to handle the customer name. o A constructor that accepts customer name (a string) as a parameter. The constructor assigns this parameter to the customer name property. Methods - A method which displays the welcome message along with the products and their prices (output of this method is shown in the first screenshot). - A method which will ask for the product code and quantity to add to the transaction. Using appropriate control structures, this method will update the total according to price of the product purchased. The method will also build the transaction details by adding the product subtotal to the total. (the output of this method is shown in the second screenshot). o A method which will print out the customer name, transaction details, and total of the customer purchases rounded to two decimal places (see third screenshot). Make sure that your output looks like the screenshots given above. Class TransactionTest must drive the application by: - Creating an object of the class Transaction using its constructor. The customer name will be prompted from the user and will be provided to the constructor. - Calling the method that displays the product prices. - Then calling the method that would ask the user for the products they would like to purchase. - Finally calling the method that would show the final transaction details as shown in the screenshot above. Problem Description: The ACME Corporation would like you to develop an application that can be used to handle its sales transactions. As the application begins, it prompts for customer name, which is then used to print a welcome message. The application then prints the various products that the store offers along with their respective prices, and discount quantities as shown in the following screenshot: Please enter Customer Name: Salman Nazir Welcome, Salman Nazir, to ACME Corporation's Product Shop! Please choose from the following products by entering the product code followed by the quantity. Enter z. For this you will use null as the sentinel), as shown in screenshot below: Product Code: AD Quantity: 30 Product Code: AA Quantity: 20 Product Code: AM Quantity: 101 Product Code: AA Quantity: 47 Product Code: AC Quantity: 30 Product Code: Z If the user requests a product quantity equal to or greater than the discount quantity for that product, they get a 10% discount on the line total for that product. If a product is ordered multiple times, the quantities should be combined and the discount should be based on the total quantity ordered for that product. If a product is not ordered, it should not appear on the final invoice. When the user indicates that no more products are to be added, the program prints the customer name, the subtotals and the invoice total as shown in the screen shot below: Technical Specifications: - You will submit two classes, Transaction and TransactionTest. TransactionTest will drive the Transaction class. Class Transaction must have the following: - Instance variables: - A decimal variable, which will hold the transaction total. - A string variable, which will keep track of the individual items that the customer purchases. This will be eventually displayed on the screen. - An instance variable or a property to handle the customer name. o A constructor that accepts customer name (a string) as a parameter. The constructor assigns this parameter to the customer name property. Methods - A method which displays the welcome message along with the products and their prices (output of this method is shown in the first screenshot). - A method which will ask for the product code and quantity to add to the transaction. Using appropriate control structures, this method will update the total according to price of the product purchased. The method will also build the transaction details by adding the product subtotal to the total. (the output of this method is shown in the second screenshot). o A method which will print out the customer name, transaction details, and total of the customer purchases rounded to two decimal places (see third screenshot). Make sure that your output looks like the screenshots given above. Class TransactionTest must drive the application by: - Creating an object of the class Transaction using its constructor. The customer name will be prompted from the user and will be provided to the constructor. - Calling the method that displays the product prices. - Then calling the method that would ask the user for the products they would like to purchase. - Finally calling the method that would show the final transaction details as shown in the screenshot above
Step 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