Download presentation
Presentation is loading. Please wait.
Published byMildred Craig Modified over 7 years ago
1
Exercise 1 Draw a UML class diagram that represents a travel agency's ticketing information. In this diagram, you should represent the concept of a person, consisting of a social security number, a first name, and last name. There are two types of people, customers and ticket agents. A customer is identified by his or her credit card number, and also includes information about the type of credit card and its expiration date, as well as a frequent flyer number and frequent flyer miles accumulated. A ticket agent number identifies a ticket agent. You also need to represent the concept of a flight, which consists of a flight number, a source city, a destination city, a date, departure time, and arrival time. A ticket agent assigns a ticket to a customer for a particular flight itinerary. In effect, the ticket binds the agent, the itinerary and the customer together in a unique relationship. Each ticket is associated with exactly one customer, one agent and one itinerary. Ticket has information regarding the price. An itinerary is associated with at least one flight, and possibly several. Each flight contains the following information: a flight number, a source city, a destination city, a date, departure time and an arrival time. Each flight may be associated with any number of itineraries including none. The association between itineraries and flights includes information about the seat assignment. Finally, flights are associated with airlines in a tight binding; flights cannot exist without the airlines to which they are associated with.
2
Exercise 2 What are the differences between these pair of keywords
extend and extends implement and implements throw and throws
3
Exercise 3 What is the main difference between method overriding and method overloading.
4
Exercise 4 Given an array of integer, myMarks, which has been initialize and declare as below int[] myMarks = {10, 21, 53, 49}; What is the difference between:- int[] duplicateMarks = myMarks; int[] duplicateMarks = myMarks.clone();
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.