a. Create a java class named RawMaterial. b. Add the following fields to the RawMaterial class. Note that you may determine your own field names. Each field should be private. The type of each field should be determined by the context of the field. name • supplier • inventory • id • unit cost c. Create a default constructor in the RawMaterial class that initializes each of the RawMaterial class fields to a value of your choosing. d. Create a fully parameterized constructor for the RawMaterial class. e. Implement a toString() method in the RawMaterial class that clearly prints the fields of a RawMaterial Object.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 1CP
icon
Related questions
Question
e. Implement a toString() method in the Job class that clearly prints the fields of a Job Object.
f. Implements a method named EPLS that calculates and returns the optimal lot size, Q, for producing
the job. Recall that the formula to calculate this quantity is
2DC.
Q*
| (1 – #) Cn"
where
• production rate (P)
• fixed setup cost (C.)
• holding cost (C.)
demand rate (D).
Question 3
a. Create a class named ProductionAnalysis with three static RawMaterial objects as fields. The three
objects should be called aluminum, steel and carbon. The values should be initialized with the following
values:
Object Name
aluminum Aluminum Great Aluminum
steel
carbonfiber Carbon Fiber Exotic Materials
supplier
inventory
id
|unit cost/kg|
name
1
50
Steel
Superior Steel
2
50
30
25
100
Figure 1: Raw Material Values
b. Create a main method in the ProductionAnalysis class.
c. In the main method, create an ArrayList that stores Job objects. The name of the ArrayList is your
choice.
d. Populate the ArrayList created in the previous task of this question with information from the following
figure. You may either put this information into an input file of your choosing and read the values
in, or you may manually create and add the individual objects to the ArrayList. You may ignore the
priority column of the data.
Expedited Jobs
unit cost holding cost setup cost production rate demand rate Raw Material list Priority
100
name
revenue
Sweet Desk
175
10.25
200
40
30 Aluminum, Carbon
3
Fancy Chair
125
75
8.55
100
60
25 Steel, Aluminum
1
Pretty Lamp
58
22
3.75
20
80
68 Carbon Fiber, Steel
2
Figure 2: Expedited Jobs
e. Determine the job (using code in your class(es)) that has the largest optimal lot size. Print the
information about that job to the screen along with the optimal lot size you calculated. Round your
lot size to the nearest integer.
Transcribed Image Text:e. Implement a toString() method in the Job class that clearly prints the fields of a Job Object. f. Implements a method named EPLS that calculates and returns the optimal lot size, Q, for producing the job. Recall that the formula to calculate this quantity is 2DC. Q* | (1 – #) Cn" where • production rate (P) • fixed setup cost (C.) • holding cost (C.) demand rate (D). Question 3 a. Create a class named ProductionAnalysis with three static RawMaterial objects as fields. The three objects should be called aluminum, steel and carbon. The values should be initialized with the following values: Object Name aluminum Aluminum Great Aluminum steel carbonfiber Carbon Fiber Exotic Materials supplier inventory id |unit cost/kg| name 1 50 Steel Superior Steel 2 50 30 25 100 Figure 1: Raw Material Values b. Create a main method in the ProductionAnalysis class. c. In the main method, create an ArrayList that stores Job objects. The name of the ArrayList is your choice. d. Populate the ArrayList created in the previous task of this question with information from the following figure. You may either put this information into an input file of your choosing and read the values in, or you may manually create and add the individual objects to the ArrayList. You may ignore the priority column of the data. Expedited Jobs unit cost holding cost setup cost production rate demand rate Raw Material list Priority 100 name revenue Sweet Desk 175 10.25 200 40 30 Aluminum, Carbon 3 Fancy Chair 125 75 8.55 100 60 25 Steel, Aluminum 1 Pretty Lamp 58 22 3.75 20 80 68 Carbon Fiber, Steel 2 Figure 2: Expedited Jobs e. Determine the job (using code in your class(es)) that has the largest optimal lot size. Print the information about that job to the screen along with the optimal lot size you calculated. Round your lot size to the nearest integer.
Question 1
a. Create a java class named RawMaterial.
b. Add the following fields to the RawMaterial class. Note that you may determine your own field names.
Each field should be private. The type of each field should be determined by the context of the field.
name
• supplier
• inventory
• id
• unit cost
c. Create a default constructor in the RawMaterial class that initializes each of the RawMaterial class
fields to a value of your choosing.
d. Create a fully parameterized constructor for the RawMaterial class.
e. Implement a toString() method in the RawMaterial class that clearly prints the fields of a RawMaterial
Object.
Question 2
a. Create a java class named Job.
b. Add the following fields to the Job class. Note that you may determine your own field names. Each
field should be private. The type of each field should be determined by the context of the field.
job name
job revenue
• job unit cost
job holidng cost per unit time
job setup cost
• job production rate
job demand rate
• list of Raw Material objects
c. Create a default constructor in the Job class that initializes each of the Job class fields to a value of
your choosing.
d. Create a fully parameterized constructor for the Job class.
Transcribed Image Text:Question 1 a. Create a java class named RawMaterial. b. Add the following fields to the RawMaterial class. Note that you may determine your own field names. Each field should be private. The type of each field should be determined by the context of the field. name • supplier • inventory • id • unit cost c. Create a default constructor in the RawMaterial class that initializes each of the RawMaterial class fields to a value of your choosing. d. Create a fully parameterized constructor for the RawMaterial class. e. Implement a toString() method in the RawMaterial class that clearly prints the fields of a RawMaterial Object. Question 2 a. Create a java class named Job. b. Add the following fields to the Job class. Note that you may determine your own field names. Each field should be private. The type of each field should be determined by the context of the field. job name job revenue • job unit cost job holidng cost per unit time job setup cost • job production rate job demand rate • list of Raw Material objects c. Create a default constructor in the Job class that initializes each of the Job class fields to a value of your choosing. d. Create a fully parameterized constructor for the Job class.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT