Question: Write two java classes for this assignment per the two uml diagrams below. The TicketTest program has been added to this assignment for instantiating and

Write two java classes for this assignment per the two uml diagrams below. The TicketTest program has been added to this assignment for instantiating and testing out both the Ticket and Seat classes. Download the TicketTest and place it in the same directory as your Ticket and Seat classes. First compile all three classes, if there are compile errors though your Ticket and Seat classes compile that means your Ticket and Seat classes do not meet the requirements specified in the following uml diagrams. If all three classes do compile, run TicketTest. The output you should see is provided below.

Do notice that the Ticket class contains a field(variable) for a Seat object, this is called an aggregation of objects. Also take note that the toString() and equals() methods are required

for both classes.

Write two java classes for this assignment per the two uml diagrams

First Ticket: TicketEvent: Hedwig and The Angry Inch

Ticket Price: 58.25

Event Date: Mon Apr 10 14:00:00 EDT 2017 Seat

Location: Orchestra Center Right

Aisle: HH

Seat Number: 10 Second Ticket: TicketEvent: Wicked

Ticket Price: 72.0

Event Date: Fri Jun 16 14:00:00 EDT 2017 Seat

Location: Balcony Left

Aisle: DD

Seat Number: 7 Are the tickets equal:false Are the tickets equal now:true

First Ticket: Ticket

Event: Wicked

Ticket Price: 72.0

Event Date: Fri Jun 16 14:00:00 EDT 2017 Seat

Location: Balcony Left

Aisle: DD

Seat Number: 7 Second Ticket: Ticket

Event: Wicked

Ticket Price: 72.0

Event Date: Fri Jun 16 14:00:00 EDT 2017 Seat

Location: Balcony Left

Aisle: DD

Seat Number: 7

Ticket Seat String event Double ticketPrice Seat seat Date dateOfEvent String location String aisle Int seatNumber Constructor(s) String getEvent() void setEvent(String pEvent) Double getTicketPrice() void setTicketPrice (Double pPrice) Seat getSeat() void setSeat(Seat pSeat) Date getDateOfEvent() void setDateOfEvent (Date pDate) String toString() Boolean equals(Object obj) Constructor(s) String getLocation() void setLocation(String pLoc) String getAisle() void setAisle(String pAisle) intgetSeatNumber() void setSeatNumber(int pNbr) String toString() Boolean equals(Object obj)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!