Question: BASIC JAVA CODING HELP! Im looking for help with this problem in very simple beginner java code. I haven't learned IF>Then statements and I'm very
BASIC JAVA CODING HELP! Im looking for help with this problem in very simple beginner java code. I haven't learned IF>Then statements and I'm very confused with the class. I was hoping someone would be able to answer this and explain their steps and explain what the things in the program are doing on the two different files. Thank you so much. I really appreciate any help.



The following must be completed before you come to lab. Create the UML class diagram for the Widget Producer class. The Widget Producer class is for a widget manufacturing plant. The class has one instance variable and one constant. The instance variable, widgets PerHours, holds how many widgets can be produced in one hour. Create a constructor with one argument for widgetsPer Hour. Also create a getter for widgetsPer Hour (no setter is needed). The class also needs a method that calculates how many days it will take to produce the number of widgets that is passed into the method. The plant operates two shifts of eight hours each per day which is used to populate the constant PRODUCTION_HOURS_PER_DAY. Create 3 sets of test data to test the Widget Producer class. Input I Output daysToProduce widgetsPerHour numberWidgets Part 1 Requirements Implement the Widget Producer class you designed for pre-lab. Demonstrate the Widget Producer class by writing a Widget Tester class that has a main method. Create three Widget Producer objects, one for each test case. Call the method and display the number of days formatted to one decimal place. Sample Output for one test case: 100 widgets produced at 10 per hour will take 0.6 days. Part 2 Write the complete code for the class Truck as given in the class diagram below. Be sure to not use duplicate code in the constructors. For example, the constructors with 2 arguments should call the one with 1 argument to set the value for cylinder. Use the provided file TruckTester.java to test your class. Truck - cylinders:int manufacturer:String load:double tow: double + Truck() + Truck (int cylinders) + Truck (int cylinders, String manufacturer) + Truck (int cylinders, String manufacturer, double load) + Truck (int cylinders, String manufacturer, double load, double tow) + getCylinders (): int + set Cylinders (int cylinders) : void + get Manufacturer(): String + set Manufacturer (String manufacturer):void + getLoad() : double + set Load (double load) : void + get Tow(): double + set Tow (double tow):void + toString(): String Use the following to code the toString() method. (You will be learning how to write this in a couple of weeks.) public String toString() return " cylinders = " + cylinders + " manufacturer = " + manufacturer + " load = " + load + " tow = " + tow; The following must be completed before you come to lab. Create the UML class diagram for the Widget Producer class. The Widget Producer class is for a widget manufacturing plant. The class has one instance variable and one constant. The instance variable, widgets PerHours, holds how many widgets can be produced in one hour. Create a constructor with one argument for widgetsPer Hour. Also create a getter for widgetsPer Hour (no setter is needed). The class also needs a method that calculates how many days it will take to produce the number of widgets that is passed into the method. The plant operates two shifts of eight hours each per day which is used to populate the constant PRODUCTION_HOURS_PER_DAY. Create 3 sets of test data to test the Widget Producer class. Input I Output daysToProduce widgetsPerHour numberWidgets Part 1 Requirements Implement the Widget Producer class you designed for pre-lab. Demonstrate the Widget Producer class by writing a Widget Tester class that has a main method. Create three Widget Producer objects, one for each test case. Call the method and display the number of days formatted to one decimal place. Sample Output for one test case: 100 widgets produced at 10 per hour will take 0.6 days. Part 2 Write the complete code for the class Truck as given in the class diagram below. Be sure to not use duplicate code in the constructors. For example, the constructors with 2 arguments should call the one with 1 argument to set the value for cylinder. Use the provided file TruckTester.java to test your class. Truck - cylinders:int manufacturer:String load:double tow: double + Truck() + Truck (int cylinders) + Truck (int cylinders, String manufacturer) + Truck (int cylinders, String manufacturer, double load) + Truck (int cylinders, String manufacturer, double load, double tow) + getCylinders (): int + set Cylinders (int cylinders) : void + get Manufacturer(): String + set Manufacturer (String manufacturer):void + getLoad() : double + set Load (double load) : void + get Tow(): double + set Tow (double tow):void + toString(): String Use the following to code the toString() method. (You will be learning how to write this in a couple of weeks.) public String toString() return " cylinders = " + cylinders + " manufacturer = " + manufacturer + " load = " + load + " tow = " + tow
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
