Question: 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
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.
Do not use "try" and "catch" in the code. Havent been covered yet
Java 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.FYIyou dont have to put all states inat 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
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
copymethod
toStringthis will include its Place.
Create a driver that will:
create an ArrayList of PleasurePlace objects.The data comes from FunPlace.csvDownload FunPlace.csv
You must add at least records to this file of your own choice.
Read all data for the PleasurePlaces and Places here. Use the split method.
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 priceYou may sort these OR pick a price and display all those Pleasure Places that are less than the price
NB: Please include the methods to executes these four records in the code.
Create a menu of the above options one should be the option to quitoptionsCode 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
