(Solved) : 9 Pennies Pay Design Program Calculates Amount Money Person Would Earn Period Time Salary Q37292228 . . .








9. Pennies for Pay Design a program that calculates the amount of money a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day, and continues to double each day. The program should ask the user for the number of days. Display a table showing what the salary was for each day, and then show the total pay at the end of the period. The output should be displayed in a dollar amount, not the number of pennies. 3. The Secondhand Rose Resale Shop is having a seven-day sale during which the price of any unsold item drops 10 percent each day. Design a class diagram showing the class, the application program, the relationship between the two, and multiplicity. Then write the Java code as described below. Be sure to follow the CSI 117 Style Criteria for naming conventions, class diagrams, pseudocode, keywords, and operators o An Inventory class that contains – an item number and the original price of the item. Include the following A default constructor that initializes each attribute to some reasonable default value for a non-existent inventory item – Another constructor method that has a parameter for each data member, called the overloaded constructor. This constructor initializes each attribute to the value provided when an object of this type is instantiated Be sure to incorporate adequate error checking for all numeric attributes. Accessor and mutator methods for each attribute. Be sure to incorporate adequate error checking for all numeric attributes » Extra credit for including Javadoc comments o An application program that contains two methods: the main) module and the printSaleDataOmodule . The main)module must do the following – create an Inventory object using the default constructor – use a loop to get inventory items from the user. The user should enter the item number and the original price of the item. This loop should continue until the user indicates that they have no more items to enter. For each item entered by the user, the code inside the loop should do the following 2 items: – set the attributes of the Inventory object by calling the appropriate method in the Inventory class for each item entered by the user – send the Inventory items, one at a time, to the printSaleData0 module for processing – Extra credit for including Javadoc comments Directions for completing and submitting the homework: You will be submitting the following files: ·Task #1 : o Pseudocode written with Word, Notepad++ or similar application Task #2: o Pennies.java . Task #3 o Inventory.java o The application class created in 3b below o The UML class diagram created in ArgoUML, Raptor, or similar application Homework Assignment 1. Write the pseudocode needed to complete Chapter 5, number 9 – Pennies for Pay 2. Implement Pennies for Pay in Java. We were unable to transcribe this image3. The Secondhand Rose Resale Shop is having a seven-day sale during which the price of any unsold item drops 10 percent each day. Design a class diagram showing the class, the application program, the relationship between the two, and multiplicity. Then write the Java code as described below. Be sure to follow the CSI 117 Style Criteria for naming conventions, class diagrams, pseudocode, keywords, and operators o An Inventory class that contains – an item number and the original price of the item. Include the following A default constructor that initializes each attribute to some reasonable default value for a non-existent inventory item – Another constructor method that has a parameter for each data member, called the overloaded constructor. This constructor initializes each attribute to the value provided when an object of this type is instantiated Be sure to incorporate adequate error checking for all numeric attributes. Accessor and mutator methods for each attribute. Be sure to incorporate adequate error checking for all numeric attributes » Extra credit for including Javadoc comments We were unable to transcribe this imageThe printSaleData)module must accept an Inventory object and produce a report that shows the item number and the price of an inventory item on each day of the sale, one through seven, using a loop. For example, an item with an original price of $10.00 costs 10 percent less, or $9.00, on the first day of the sale. On the second day of the sale, the same item is 10 percent less than $9.00, or $8.10 Show transcribed image text 9. Pennies for Pay Design a program that calculates the amount of money a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day, and continues to double each day. The program should ask the user for the number of days. Display a table showing what the salary was for each day, and then show the total pay at the end of the period. The output should be displayed in a dollar amount, not the number of pennies.
3. The Secondhand Rose Resale Shop is having a seven-day sale during which the price of any unsold item drops 10 percent each day. Design a class diagram showing the class, the application program, the relationship between the two, and multiplicity. Then write the Java code as described below. Be sure to follow the CSI 117 Style Criteria for naming conventions, class diagrams, pseudocode, keywords, and operators o An Inventory class that contains – an item number and the original price of the item. Include the following A default constructor that initializes each attribute to some reasonable default value for a non-existent inventory item – Another constructor method that has a parameter for each data member, called the overloaded constructor. This constructor initializes each attribute to the value provided when an object of this type is instantiated Be sure to incorporate adequate error checking for all numeric attributes. Accessor and mutator methods for each attribute. Be sure to incorporate adequate error checking for all numeric attributes » Extra credit for including Javadoc comments
o An application program that contains two methods: the main) module and the printSaleDataOmodule . The main)module must do the following – create an Inventory object using the default constructor – use a loop to get inventory items from the user. The user should enter the item number and the original price of the item. This loop should continue until the user indicates that they have no more items to enter. For each item entered by the user, the code inside the loop should do the following 2 items: – set the attributes of the Inventory object by calling the appropriate method in the Inventory class for each item entered by the user – send the Inventory items, one at a time, to the printSaleData0 module for processing – Extra credit for including Javadoc comments
Directions for completing and submitting the homework: You will be submitting the following files: ·Task #1 : o Pseudocode written with Word, Notepad++ or similar application Task #2: o Pennies.java . Task #3 o Inventory.java o The application class created in 3b below o The UML class diagram created in ArgoUML, Raptor, or similar application Homework Assignment 1. Write the pseudocode needed to complete Chapter 5, number 9 – Pennies for Pay 2. Implement Pennies for Pay in Java.
3. The Secondhand Rose Resale Shop is having a seven-day sale during which the price of any unsold item drops 10 percent each day. Design a class diagram showing the class, the application program, the relationship between the two, and multiplicity. Then write the Java code as described below. Be sure to follow the CSI 117 Style Criteria for naming conventions, class diagrams, pseudocode, keywords, and operators o An Inventory class that contains – an item number and the original price of the item. Include the following A default constructor that initializes each attribute to some reasonable default value for a non-existent inventory item – Another constructor method that has a parameter for each data member, called the overloaded constructor. This constructor initializes each attribute to the value provided when an object of this type is instantiated Be sure to incorporate adequate error checking for all numeric attributes. Accessor and mutator methods for each attribute. Be sure to incorporate adequate error checking for all numeric attributes » Extra credit for including Javadoc comments
The printSaleData)module must accept an Inventory object and produce a report that shows the item number and the price of an inventory item on each day of the sale, one through seven, using a loop. For example, an item with an original price of $10.00 costs 10 percent less, or $9.00, on the first day of the sale. On the second day of the sale, the same item is 10 percent less than $9.00, or $8.10
Expert Answer
Answer to 9. Pennies for Pay Design a program that calculates the amount of money a person would earn over a period of time if his…
OR