WalkBehindMower, GasPoweredMower, PushReelMower, and MowerWarehouse clas

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

I need WalkBehindMower, GasPoweredMower, PushReelMower, and MowerWarehouse class. I pasted the other pecks to go off of.

public class Engine { private String manufacturer; private double horsePower; private int cylinders; public Engine() { manufacturer = ""; horsePower = 0; cylinders = 0; } public Engine(String manufacturer, double horsePower, int cylinders) { this.manufacturer = manufacturer; this.horsePower = horsePower; this.cylinders = cylinders; } public String getManufacturer() { return manufacturer; } public void setManufacturer(String manufacturer) { this.manufacturer = manufacturer; } public double getHorsePower() { return horsePower; } public void setHorsePower(double horsePower) { this.horsePower = horsePower; } public int getCylinders() { return cylinders; } public void setCylinders(int cylinders) { this.cylinders = cylinders; } @Override public String toString() { return "Engine: " + "\nmanufacturer=" + manufacturer + "\nhorsePower=" + horsePower + "\ncylinders=" + cylinders; } }

============================================================================================

public abstract class Mower { private String manufacturer; private int year; private String serialNumber; public Mower() { manufacturer = ""; year = 0; serialNumber = ""; } public Mower(String manufacturer, int year, String serialNumber) { this.manufacturer = manufacturer; this.year = year; this.serialNumber = serialNumber; } public String getManufacturer() { return manufacturer; } public void setManufacturer(String manufacturer) { this.manufacturer = manufacturer; } public int getYear() { return year; } public void setYear(int year) { this.year = year; } public String getSerialNumber() { return serialNumber; } public void setSerialNumber(String serialNumber) { this.serialNumber = serialNumber; } @Override public String toString() { return "Mower: " + "\nmanufacturer=" + manufacturer + "\nyear=" + year + "\nserialNumber='" + serialNumber; } }

============================================================================================

public class LawnTractor extends Mower { private Engine enginer; private String model; private double deckWidth; public LawnTractor() { } public Engine getEnginer() { return enginer; } public void setEnginer(Engine enginer) { this.enginer = enginer; } public String getModel() { return model; } public void setModel(String model) { this.model = model; } public double getDeckWidth() { return deckWidth; } public void setDeckWidth(double deckWidth) { this.deckWidth = deckWidth; } @Override public String toString() { return "LawnTractor:" + "\nenginer=" + enginer + "\nmodel=" + model + "\ndeckWidth=" + deckWidth ; } }

============================================================================================

public class CommericalMower extends LawnTractor { private double operatingHours; private boolean zeroTurnRadius; public CommericalMower() { operatingHours = 0; zeroTurnRadius = false; } public double getOperatingHours() { return operatingHours; } public void setOperatingHours(double operatingHours) { this.operatingHours = operatingHours; } public boolean isZeroTurnRadius() { return zeroTurnRadius; } public void setZeroTurnRadius(boolean zeroTurnRadius) { this.zeroTurnRadius = zeroTurnRadius; } @Override public String toString() { return "CommericalMower{" + "\nOperating Hours=" + operatingHours + "\nZero Turn Radius=" + zeroTurnRadius; } }

MowerWareHouse
Mower
A A
LawnTractor
WalkBehindMower
Engine
CommercialMower
GasPoweredMower
PushReelMower
Transcribed Image Text:MowerWareHouse Mower A A LawnTractor WalkBehindMower Engine CommercialMower GasPoweredMower PushReelMower
3.5 WalkBehindMower Class (Abstract)
WalkBehindMower
Blade width of mower
-cutWidth: double
Diameter of the mower wheels
-wheelDiameter : double
+WalkBehindMower()
+l/Accessor and Mutators
+toString():String
Put each property on a separate line.
3.6 GasPoweredMower
GasPoweredMower
Mower engine
Is the mower self-propelled
-engine : Engine
-selfPropelled: boolean
GasPoweredMower()
+//Accessor and Mutators
+toString():String
Put each property on a separate line.
3-7 PushReelMower
PushReelMower
-numWheels : integer
+PushReelMower()
+//Accessor and Mutators
+toString():String
Number of wheels on the mower
Put each property on a separate line.
3.8 MowerWareHouse
MowerWareHouse
-storeName: String
-mowers : ArrayList<Mower>
+MowerWareHouse()
+I|Accessor and Mutators
+readMowerData( inputFileName : String): void
+saveMowerData( outputFileName :String):void
+toString()String
Name of the mower store
Put each property on a separate line.
Transcribed Image Text:3.5 WalkBehindMower Class (Abstract) WalkBehindMower Blade width of mower -cutWidth: double Diameter of the mower wheels -wheelDiameter : double +WalkBehindMower() +l/Accessor and Mutators +toString():String Put each property on a separate line. 3.6 GasPoweredMower GasPoweredMower Mower engine Is the mower self-propelled -engine : Engine -selfPropelled: boolean GasPoweredMower() +//Accessor and Mutators +toString():String Put each property on a separate line. 3-7 PushReelMower PushReelMower -numWheels : integer +PushReelMower() +//Accessor and Mutators +toString():String Number of wheels on the mower Put each property on a separate line. 3.8 MowerWareHouse MowerWareHouse -storeName: String -mowers : ArrayList<Mower> +MowerWareHouse() +I|Accessor and Mutators +readMowerData( inputFileName : String): void +saveMowerData( outputFileName :String):void +toString()String Name of the mower store Put each property on a separate line.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

In the picture is what the output is supposed to look like. I copied the dataset below. pls help

Monstrous Mower Warehouse Briggs and Stratton 2015 AFXH1 L Gravely Parts 10.8 2 Model1 45.5 B&H Manufacturing 2011 AFXH2 C Poulan Parts 10.5 2 Model2 5.8 35.5 false Bush Hog Manufacturing 2013 AFXH3 G 20 16 Homelite Parts 10.5 2 true Ferris Industries 2003 AFXH4 P 18 25.1 4 Briggs and Stratton II 2015 AFXH1vv L Gravely Parts 13.3 2 Model1 45.5

 

separate line in the same order
listed in the UML diagrams.
You need to ask the user to input which type of concrete mower
he wishes to get information on. Provide four options:
LawnTractor, CommericalMower, GasPoweredMower and
PushReelMower. He can only chose one of the four by providing a
character : L for Lawn Tractor, C for Commercial, G for Gas
powered, and P for Push reel. If he provides any other input, output that the option provided is
invalid. Otherwise, if selected one of the four, display a list of mowers in that type and provide it's
details. Example output can be seen below:
Figure 1: Input File Format
Enter your choice of Mower to get information.
Type C for Commercial Mower, G for Gas Powered Mower, P for Push reel Mower, L for Lawn Tractor, and S to stop
Briggs and Stratton, 2015, AFXH1, L,Gravely Parts, 10.8,2,Model1,45.5
Briggs and Stratton II,2015, AFXH1VV, L,Gravely Parts, 13.3,2,Model1,45.5
Type C for Commercial Mower, G for Gas Powered Mower, P for Push reel Mower, L for Lawn Tractor, and S to stop
Bush Hog Manufacturing, 2013,AFXH3,G,20.0,16.0,Homelite Parts, 10.5,2, true
Type C for Commercial Mower, G for Gas Powered Mower, P for Push reel Mower, L for Lawn Tractor, and S to stop
B&H Manufacturing, 2011,AFXH2,C, Poulan Parts, 10.5,2, Model2,5.8,35.5, false
Type C for Commercial Mower, G for Gas Powered Mower, P for Push reel Mower, L for Lawn Tractor, and S to stop
Transcribed Image Text:separate line in the same order listed in the UML diagrams. You need to ask the user to input which type of concrete mower he wishes to get information on. Provide four options: LawnTractor, CommericalMower, GasPoweredMower and PushReelMower. He can only chose one of the four by providing a character : L for Lawn Tractor, C for Commercial, G for Gas powered, and P for Push reel. If he provides any other input, output that the option provided is invalid. Otherwise, if selected one of the four, display a list of mowers in that type and provide it's details. Example output can be seen below: Figure 1: Input File Format Enter your choice of Mower to get information. Type C for Commercial Mower, G for Gas Powered Mower, P for Push reel Mower, L for Lawn Tractor, and S to stop Briggs and Stratton, 2015, AFXH1, L,Gravely Parts, 10.8,2,Model1,45.5 Briggs and Stratton II,2015, AFXH1VV, L,Gravely Parts, 13.3,2,Model1,45.5 Type C for Commercial Mower, G for Gas Powered Mower, P for Push reel Mower, L for Lawn Tractor, and S to stop Bush Hog Manufacturing, 2013,AFXH3,G,20.0,16.0,Homelite Parts, 10.5,2, true Type C for Commercial Mower, G for Gas Powered Mower, P for Push reel Mower, L for Lawn Tractor, and S to stop B&H Manufacturing, 2011,AFXH2,C, Poulan Parts, 10.5,2, Model2,5.8,35.5, false Type C for Commercial Mower, G for Gas Powered Mower, P for Push reel Mower, L for Lawn Tractor, and S to stop
Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question

Thank you! I need the program to produce an output as seen in the photo and with the data I provided in the other photo. Could someone modify the code so it can run properly?

Monstrous Mower Warehouse
Briggs and Stratton
2015
AFXH1
Gravely Parts
10.8
2
Modell
45.5
B&H Manufacturing
2011
AFXH2
C
Poulan Parts
10.5
2
Model2
5.8
35.5
false
Bush Hog Manufacturing
2013
AFXH3
G
20
16
Homelite Parts
10.5
2
true
Ferris Industries
2003
АҒХН4
P
18
25.1
4
Briggs and Stratton II
2015
AFXH1vv
Gravely Parts
13.3
2
Modell
45.5
Transcribed Image Text:Monstrous Mower Warehouse Briggs and Stratton 2015 AFXH1 Gravely Parts 10.8 2 Modell 45.5 B&H Manufacturing 2011 AFXH2 C Poulan Parts 10.5 2 Model2 5.8 35.5 false Bush Hog Manufacturing 2013 AFXH3 G 20 16 Homelite Parts 10.5 2 true Ferris Industries 2003 АҒХН4 P 18 25.1 4 Briggs and Stratton II 2015 AFXH1vv Gravely Parts 13.3 2 Modell 45.5
The name of the input file will be supplied using command-line
arguments. If no command-line argument is supplied, then your
program should prompt the user for the input file using the
JFileChooser class. Here is the format of the input file:
Store name
Mower Class Properties
Mower Subclass Type (L, C, G, P)
Subclass Properties
5 Output
Note: Each properties will be on a
separate line in the same order
listed in the UML diagrams.
You need to ask the user to input which type of concrete mower
he wishes to get information on. Provide four options:
LawnTractor, CommericalMower, GasPoweredMower and
PushReelMower. He can only chose one of the four by providing a
character :L for Lawn Tractor, C for Commercial, G for Gas
powered, and P for Push reel. If he provides any other input, output that the option provided is
invalid. Otherwise, if selected one of the four, display a list of mowers in that type and provide it's
details. Example output can be seen below:
Figure 1: Input File Format
Enter your choice of Mower to get information.
Type C for Commercial Mower, G for Gas Powered Mower, P for Push reel Mower, L for Lawn Tractor, and S to stop
Briggs and Stratton, 2015, AFXH1, L,Gravely Parts, 10.8,2,Model1,45.5
Briggs and Stratton II,2015,AFXH1vv, L,Gravely Parts,13.3,2, Model1,45.5
Type C for Commercial Mower, G for Gas Powered Mower, P for Push reel Mower, L for Lawn Tractor, and S to stop
G
Bush Hog Manufacturing,2013,AFXH3,G,20.0,16.0,Homelite Parts,10.5,2,true
Type C for Commercial Mower, G for Gas Powered Mower
Transcribed Image Text:The name of the input file will be supplied using command-line arguments. If no command-line argument is supplied, then your program should prompt the user for the input file using the JFileChooser class. Here is the format of the input file: Store name Mower Class Properties Mower Subclass Type (L, C, G, P) Subclass Properties 5 Output Note: Each properties will be on a separate line in the same order listed in the UML diagrams. You need to ask the user to input which type of concrete mower he wishes to get information on. Provide four options: LawnTractor, CommericalMower, GasPoweredMower and PushReelMower. He can only chose one of the four by providing a character :L for Lawn Tractor, C for Commercial, G for Gas powered, and P for Push reel. If he provides any other input, output that the option provided is invalid. Otherwise, if selected one of the four, display a list of mowers in that type and provide it's details. Example output can be seen below: Figure 1: Input File Format Enter your choice of Mower to get information. Type C for Commercial Mower, G for Gas Powered Mower, P for Push reel Mower, L for Lawn Tractor, and S to stop Briggs and Stratton, 2015, AFXH1, L,Gravely Parts, 10.8,2,Model1,45.5 Briggs and Stratton II,2015,AFXH1vv, L,Gravely Parts,13.3,2, Model1,45.5 Type C for Commercial Mower, G for Gas Powered Mower, P for Push reel Mower, L for Lawn Tractor, and S to stop G Bush Hog Manufacturing,2013,AFXH3,G,20.0,16.0,Homelite Parts,10.5,2,true Type C for Commercial Mower, G for Gas Powered Mower
Solution
Bartleby Expert
SEE SOLUTION
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY