Doll Project 2 – Java

Design a Level 3 Java program using an IPO chart for the project. Example IPO is included.Â

Â

Part Two

Using a modular approach, modify Project 2 to include methods.Â

In addition to the main method design and code the following static methods.

    • A method that accepts argument(s) and will return the markup rate.

Â

    • A method that accepts argument(s) and will calculate and return the markup amount for one doll.

Â

    • A method that accepts argument(s) and will calculate and return the potential revenue for each doll group.

Â

    • A method that accepts argument(s) and will calculate and return the total number of dolls made (all dolls).

Â

    • A method that accepts argument(s) and will calculate and return the total potential revenue (all dolls).

Â

    • A method that accepts argument(s) and will display the following product group information:
      • doll type
      • the markup amount for one doll (per group)
      • the number of dolls made in the group
      • the potential revenue for the doll group

Â

  • A method that accepts argument(s) and will display the following:
    • total number of dolls made (all dolls)
    • the total potential revenue (all dolls)

Â

See the sample output code below.

Â

Notes

Â

  1. Project 3 is a continuation of Project 2.
  2. You should use your IPO design to code this project.
  3. Read the text file from the main method.
  4. The text file should not be edited. Your program should be able to process the file as is.
  5. The Scanner class must be used to read and process the file.
  6. An error occurs if your Java program tries to read a file that is not accessible. Java calls errors like these Exceptions. You will learn how to handle exceptions if you take CSC251. For now, it is sufficient to state the error might occur. Include the following at the end of your main method: public static void main(String[ ] args) throws IOException

Sample Output

Doll type: Princess
Cost to make one Princess doll: $15.00
Percentage of markup on a Princess doll: 60%
The markup amount on a Princess doll: $9.00
Number of dolls in the Princess group: 20
Potential revenue for the Princess doll: $180.00

Doll type: Flight Attendant
Cost to make one Flight Attendant doll: $20.00
Percentage of markup on a Flight Attendant doll: 50%
The markup amount on a Flight Attendant doll: $10.00
Number of dolls in the Flight Attendant group: 30
Potential revenue for the Flight Attendant doll: $300.00

Doll type: Doctor
Cost to make one Doctor doll: $10.50
Percentage of markup on a Doctor doll: 40%
The markup amount on a Doctor doll: $4.20
Number of dolls in the Doctor group: 20
Potential revenue for the Doctor doll: $84.00

Doll type: Skater
Cost to make one Skater doll: $15.00
Percentage of markup on a Skater doll: 30%
The markup amount on a Skater doll: $4.50
Number of dolls in the Skater group: 20
Potential revenue for the Skater doll: $90.00

Total number of dolls made: 90
Total profit for all groups: $654.00

Order from us and get better grades. We are the service you have been looking for.