Calculate and print the total cost for all travel


Discuss the below:

Task:

You are working with a travel agent to support a conference in Las Vegas. Attendees must register for the conference with a valid email address (see below), name and valid phone number (see below). Every conference registration has an attendee, and a number of sessions in which he/she chooses to participate. Additionally, registrations are either with or without travel (see below).

After creating an appropriate inheritance structure for your data definition classes, write a Java application that uses an array of registrations. The application should first accept all registrations (asking the user if they need to include travel in their reservation or not). Once all registrations are entered, print a list of all attendees. Also, calculate and print the total cost for all travel.

Details:

Valid email address:

o Has an @ and a period.

o Only letters, numbers and underscore in username portion (before the @); must begin with a letter.

o At least two characters (letters or numbers) between the @ and period.

o At least two letters after the period.

Valid phone number:

o xxx-­-xx-­-xxxx (where x is a digit)

o xxxxxxxxx (where x is a digit)

Conference cost:

o All registrants: $100 plus $20 for each session (0 - 10)

o Travel

§ Flight: $500

§ Taxi from airport: $50, or Bus from airport: $20

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Calculate and print the total cost for all travel
Reference No:- TGS01931732

Now Priced at $20 (50% Discount)

Recommended (90%)

Rated (4.3/5)