Question: I already have the codes for the Place class and PleasurePlace class. I only need help writing the JAVA codes to create the driver. Especially
I already have the codes for the "Place" class and "PleasurePlace" class. I only need help writing the JAVA codes to create the driver. Especially writing a method to execute the records that will probably be in a switch statement.
Please write the methods to execute the records Use split method to read all data for the PleasurePlaces and Places here.
Do not use "try" and "catch" in the Java code.
This is One Object Oriented Program and is using aggregation and sorting concepts. The equals, copy constructor and copy methods can be researched in your book index if it is not in the current chapter.
J Doc comments at the start of all classes.
Aggregation Project:
Design a UML class aggregation diagram using the classes below.
A class called Place.
A Place will have two attributes:
city
state
A Place will have these methods:
default constructor
overloaded constructor
copy constructor
setters and getters for all attributes
get State initials get the abbreviation for the state. You may use a utility or a case structure. FYI you don't have to put all states in at least have what you have in the file. Pick a few and test. If you usean enumerated type here or a Utility class for getting the state's initials, that will be a bonus point.
copy
equals
toString
This is One Object Oriented Program and is using aggregation and sorting concepts. The equals,
copy constructor and copy methods can be researched in your book index if it is not in the current
chapter.
J Doc comments at the start of all classes.
Aggregation Project:
Design a UML class aggregation diagram using the classes below.
A class called Place.
A Place will have two attributes:
city
state
A Place will have these methods:
default constructor
overloaded constructor
copy constructor
setters and getters for all attributes
get State initials get the abbreviation for the state. You may use a utility or a case structure.
FYI you don't have to put all states in at least have what you have in the file. Pick a few
and test. If you usean enumerated type here or a Utility class for getting the state's initials,
that will be a bonus point.
copy
equals
toString
equals
toString
A PleasurePlace class.
A PleasurePlace will have these attributes:
name
type Example house, amusement park, corn maze, escape room
price
Place this will be of the Place class Aggregation a class is an attribute inside another class
A PleasurePlace will have these methods:
default constructor
overloaded constructor that allows name, type, price and a Place object to be passed in
overloaded constructor that allows name, price Place
copy constructor
all getters
all setters
equals
copy method
toString this will include its Place.
Create a driver that will:
create an ArrayList of PleasurePlace objects. The data comes from FunPlace.csv darr
You must add at least records to this file of your own choice.
Read all data for the PleasurePlaces and Places here. If you used String Tokenizer last lab, use
the split method this time and visaversa.
Create a driver that will:
create an ArrayList of PleasurePlace objects. The data comes from FunPlace.csv
raru must add at least records to this file of your own choice.
Read all data for the PleasurePlaces and Places here. If you used String Tokenizer last lab, use
the split method this time and visaversa.
Display all PleasurePlace objects
Search PleasurePlaces by city. The user will be prompted to enter city. Remember to display a
message that states if no Places in the requested city. Try to use a smaller part of the city to
get the whole city. Can you use substring here?
Search PleasurePlaces by type. Remember to display a message that states if no Places in the
requested type
Search PleasurePlaces by price You may sort these OR pick a price and display all those
Pleasure Places that are less than the price
Create a menu of the above options one should be the option to quit options. Code a loop
around the menu so that the user may select another option or the last option to quit.
Deliverables zipped into one folder
Do NOT USE THE Collections class in this assignment.
The equals method, toString method, Copy Constructor and copy method should be constructed as
we do in class.
Pleasure.zargo or another appropriate name for the UML diagram
Place.java
PleasurePlace.java
PleasurePlaceDriver.java or another appropriate name
Send the file too.
Possible Data Loss Some features might be lost if you save this workbook in the commadelimited csv format. To preserve these features, save it in an Excel file format.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
