please help answer product info is in here if needed further context

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

please help answer product info is in here if needed further context

Post by answerhappygod »

please help answer
Please Help Answer Product Info Is In Here If Needed Further Context 1
Please Help Answer Product Info Is In Here If Needed Further Context 1 (59.93 KiB) Viewed 18 times
product info is in here
Please Help Answer Product Info Is In Here If Needed Further Context 2
Please Help Answer Product Info Is In Here If Needed Further Context 2 (23.27 KiB) Viewed 18 times
if needed further context
Please Help Answer Product Info Is In Here If Needed Further Context 3
Please Help Answer Product Info Is In Here If Needed Further Context 3 (80.78 KiB) Viewed 18 times
Task #3 At this step, you must add three new classes to the project: • A class to represent the user-hardware store customer. You decide what members the class needs. Your program must ask the user to input necessary information. • You may notice that the date is a complicated piece of data. Create a class Date that has a constructor that converts a string of the form of "mm/dd/yyyy" into an object with three fields - month, day, and year. Do not forget to check the string for correctness. Once you have this class ready, let the user input the date as a string, then your program must create an object of the type of Date. Remember, if the program reads a string from the keyboard after a number, you may need to handle the new line symbol left in the input buffer. • The result of your application is an order that must have the customer's information, the date, the product information, and the total amount to pay. Thus, the next class to add is the class Order. This class aggregates other classes-product (the superclass is a good choice due to polymorphism), user, and date. When all the information is collected, the order is ready to be created and printed out. Optionally the order may be saved in a file. Outputting the order is the primary behavior of an object of type Order, and it is the final step of the application. I recommend overriding a default toString() method to implement this functionality.
Examples of program execution User: a The inventory: 0.15 0.25 1 Light Bulb 60X 3.0 2 Light Bulb 100N 5.99 3 Steel Bolt MS 4 Steel Bolt M 5 Hose 25 feet 6 Hose 50 feet Your choice: 3 Number of unite: 1000 Date 06/12/2022 10.0 15.0 What is the purchasing date? imm/dd/yyyy) 06/12/2022 Your item: 110 | Name 13 Steel Bolt M5 0.15 Y Your total: $127.05 Save to file? (Y/N) New order? (Y/N) User: The inventory: 1 Light Bulb 60W 3.0 2 Light Bulb 100N 5.99 3 Steel Bolt M5 0.15 4 Steel Bolt M 5 Hose 25 feest Date 06/12/2022 Type X Type x Туре т Type T Type 2 Type 2 1Price (Typel 0.25 Type T 10.0 Type Your item: ID Name 15 Bose 25 feet 6 Hose 50 feet Your choice: 5 Number of units: 10 What is the purchasing date? (mm/dd/yyyy) 15.0 тур 2 Your total: $70.00 Type X Type X Type T Save to file? (Y/N) Y New order? (Y/N) 1Price IType: 10.0 = 1
Assume that the hardware store's inventory has products of three types: Products of type X have a strong demand all year round. The price does not depend on season or quantity. Products of type Y have regular prices and special bulky prices. If a customer buys 100 or more units but less than 500, then the 5% discount will apply; 500 or more units but less than 1500, then the 15% discount will apply; 1500 or more units, then the 25% discount will apply. Products of type Z are seasonable. During the 20-day period starting September 10th of each year, customers can buy 2 units and have the 3rd one for free. Your program must show the list of available products in the form of a menu and ask the user to choose the product, its amount, and the planned date of purchasing. Then, the program must calculate and output the total. For the X-product, the total is the price multiplied by the number of units. • For the Y-product, the total depends on the number of requested units. If the number is less than 100, the total is the price multiplied by the number of units. If the number is more than 100 but less than 500, the total is the 5% discounted price - Page 2 of 5 multiplied by the number of units. If the number is more than 500 but less than 1500, the total is the 15% discounted price multiplied by the number of units. If the number is more than 1500, the total is the 25% discounted price multiplied by the number of units. For the Z-product, the total is the regular price multiplied by the number of units outside the season or the promotional value. Make sure you understand the calculation during the season sale. For example, 10 items with the regular price of $2 will cost $14 during the season sale; you may implement this algorithm using integer division.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply