Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this JAVA project, create an instance/object called tourist of a linked list class. The linked list class must have a nested node class that

For this JAVA project, create an instance/object called tourist of a linked list class. The linked list class must have a nested node class that holds the following information about tourists. I have provided sample data for one tourist.

  • Name: Waldo
  • Passport Number: 12345
  • Destination: Prague

The linked list class must have the following methods (you can change the parameter names if you wish):

public void addFirst(String touristName, int passportNumber, String destinationCity)//adds a new tourist to the beginning of the list

public int size() //returns the number of tourists in the list

public String findNode(String touristName) /* finds the tourist's name in the list and returns the destination. Use iteration or recursion to traverse the list */

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions