Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement a wystem simulating a ferry boat that makes trip with everal op The Sylucaly one opening on the front, which is for embarking and

image text in transcribed
Implement a wystem simulating a ferry boat that makes trip with everal op The Sylucaly one opening on the front, which is for embarking and making and motorbike The lower deck of the ferry is more for parking. It is bonesboe-shaped, menting that the making get in through the opening drive along the lower deck until the end find the facing the opening from the inside. The lower lock is very Oo the cast are in the same order they got in fact in the middlel to disembark och cat in front of it will be the lower deck and rester it immedintly from the making de The upper deck is for parking motorbike It is straight and writy towing that the fine motorbike to set in is the last one to get out. In case a torbike in the middle has to disembark, the motorbikes standing in front of it are ray stored in the deck, the moved back to the upper deck sach that they we in the enders before In the text of the ci, it is not specified whether you have to Stackor Qurbe to impro the lower Deck the perdeck, and the saneuver Deck You choose which of the two once types is the table or by replacing Segons with Stack or Qose in your implementation. Only w the methods described in the Data Structure Sour Section above Cars and Motorbikes are both model as a Sering control the license plate Do not forget to replace car and motorbike with the respective licetuse platen in the test you peitt. 1. Create a new Java project and preci in it you should not be problemas doing this by now, if you have troubles take a look at the previous shoes) 2. Create a class Ferry containing the following (a) a private attributeSequence loverbeck (b) a private attributeSequesceString>pper Deck. (c) a private attributeSequenceStriganeuver Deck For each dock dot forget the nation! Example private Stackstring> Lover Deck - Stack String: private Quese lover Deck - new ArrayDeque String: Do not forget to import the Stack the Queved the camerayDeque You can either the Extitool (lights that appears wedel) of winport java.util.Stack: "sport java.util. Quel sport java.util.ArrayDee." at the beginning of the Ferry cricht wow package (d) a public methol vold enbarkCar (String car), for making a at the militar car is pares in the deck (e) a politic method void bark Motorbike (ering motorbike), for makin at the end print - Motorbike fortale blonde is the per deck (1) A public hol vola dienbarkCar (String car), for dating a ch. for each car that has to be an enter the dome deck print "Carcar del retered the deck when car can disemak, peint Carriere in if you find out that car is on board.print Carbon c) a pullie wethod void disembar Motorbike (String motorbike for dining amo 1. for each motorbike that has to go to the server deck print "Motorbike motorbike www to the moved when motorbike en demark print the motor de direct if you find out that notorbike wou bround preistocie motorbike w for each other that to go back from the deck back to the paper deck pelotorbike motore we hack to the upper deck 3. Cate a clean and test your code (A) embar (6) embark & motorbike (e) disebarktheard borden (d) disembark the 2nd hard work (e) try to dimbark a boembocar ( try to debarka med etter

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

4. Who would lead the group?

Answered: 1 week ago

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago