Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
Java Programming Tasks: Object-oriented Practice

Question:

Instructions

·Download from Studynet  to your UH user area, the project which you submitted as Referred Cwk – FIRE to Studynet

·Unzip, and Re-name this folder as :  FIREDemo - followed ONLY by your name e.g. if your name was Donald Trump you would save the file as FIREDemo-TrumpD (nothing more !)

·Perform the tasks specified below.  Note: each task may have some challenging requests , if you cannot do them, move on to the next task

Task 1 -  Add a new Class

1.1 Add a class Team which has the following fields: team number, game, maximum size, current size, whether mixed gender (Example might be : game = "monopoly", maximum size = 6, current size = 4 people, available = true)

1.2 Constructor which sets team number, game and max size from parameter values, and sets the current size to 1, with available to true

 

Task 2 - Add a test class

Add a new class called :  DemoCardTest with your name in the @name class comment and a main() method  (delete unnecessary code)

2.1declare and create an object of the Tourist class with the identifier crd1 with the name "Zen", a luxury rating of 4, 20 credits and a citizen of France.

2.2By calling methods available to the Tourist class add code to:

a.display in the Terminal window the card rating, with a suitable message

b.add 3 credits

c.display in the Terminal window all the details of this Card

2.3then add code to declare a Card object with the identifier crd2, and create it as an object of the Business class, with the name "Yan" and a luxury rating of 2, then add code to:

a.display in the Terminal window the card credits, with a suitable message

b.display whether the card has enough credits to use a ferry, with a suitable message

c.display in the Terminal window all the details of this Card

 

Task 3 - Testing the system

3.1Declare a variable of the ResortControl class called eden, and create it as an object of the Resort class with the location “Paradise Islands” which creates all islands, ferries and cards specified in the Appendix A

3.2Display in the Terminal window the location of all the Cards on all islands - should show that all Cards are on Base

3.3Perform the following requests to travel by calling appropriate methods (For each request, display the result in the Terminal window.

a.the Card with the id: 1001 using the shuttle ABC1  (from Base to Sprite)

b.the Card with the id: 1001 using the shuttle CDE3   ( from Sprite to Tropicana)

c.the Card with the id: 1000 using the shuttle ABC1   ( from Base to Sprite)

d.all shuttle journeys to move the Card with id 1003 from Base to Solo  (see below for ferry codes)

e.all shuttle journeys to move the Card with id 1004 from Base to Tropicana

3. Display in the Terminal window: the location of all the cards on all island  the location of card 1004 with the name Pan

Task 4 - Add a subclass

4.1Add a class Family which inherits from Card and has the following fields: Card id number, Card name, rating, credits and number of children.

4.2The constructor should set the Card's name, credits and number of children from parameter values. Card number is to be allocated sequentially, and the luxury rating set to 3.

4.3Add methods in the Family class to

·check that this type of Card has a minimum of 5 credits

·use 2 credits on a ferry journey

Note: If your Card class has abstract methods which subclasses must implement, include them in the Family class either with an empty method body {}, or neutral return value e.g  0,false,null

Task 5 - Amend Resort

Add permanently to the resort :

5.Add an Employee Card named “Donald”, whose employee number is 8765 and who has a job as a chef

5.Add an island number 5, called "Caprisun" with a rating of 3 and capacity of 10,  

5.Add the ferry "PPP" which connects Fantasia to Caprisun and the ferry "QQQ" to connect Caprisun to Sprite

support
close