subject
Computers and Technology, 04.03.2020 04:59 miya214

Complete the printShipList() Method

1. Open the Driver. java file. See below for where you will add code to finish the printShipList() method.

} else if (listType == "active") { System. out. println("\n\nSHIP LIST - Active");

// complete this code block

2. Next, review the required functionality of the "Print Ship List" menu option below.

Menu Option Validation Check(s) Functionality
Print Ship In Service List
If no ships are in the inventory, informs the user
Prints a list consisting of all ship names that are in service

3. Print Ship List Method: Complete the code for the printShipList() method. When your code is complete, test the output. Be sure that the completed method provides console output that returns ship details based on the String value passed to the method.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:10
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
Write a full class definition for a class named player , and containing the following members: a data member name of type string .a data member score of type int .a member function called setname that accepts a parameter and assigns it to name . the function returns no value.a member function called setscore that accepts a parameter and assigns it to score . the function returns no value.a member function called getname that accepts no parameters and returns the value of name .a member function called getscore that accepts no parameters and returns the value of score .this is what i have, aparently this is wrong: class player{private: string name; int score; public: void player: : setname (string n){name =n; }void player: : setscore (int s){score = s; }string player: : getname (){return name; }int player: : getscore (){return score; }};
Answers: 2
question
Computers and Technology, 23.06.2019 04:00
Write a method that takes in an array of point2d objects, and then analyzes the dataset to find points that are close together. be sure to review the point2d api. in your method, if the distance between any pair of points is less than 10, display the distance and the (x,y)s of each point. for example, "the distance between (3,5) and (8,9) is 6.40312." the complete api for the point2d adt may be viewed at ~pf/sedgewick-wayne/algs4/documentation/point2d.html (links to an external site.)links to an external site.. try to write your program directly from the api - do not review the adt's source code.
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
The place where the extended axis of the earth would touch the celestial sphere is called the celestial
Answers: 1
You know the right answer?
Complete the printShipList() Method

1. Open the Driver. java file. See below for where...
Questions
question
Spanish, 13.04.2021 20:20
question
Mathematics, 13.04.2021 20:20
question
Mathematics, 13.04.2021 20:20
question
Mathematics, 13.04.2021 20:20
question
Mathematics, 13.04.2021 20:20
Questions on the website: 13722360