public String findBoatSize() { //code } public boolean isInflatable() { //code } public boolean hasDoubleLetters() { //

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

public String findBoatSize() { //code } public boolean isInflatable() { //code } public boolean hasDoubleLetters() { //

Post by answerhappygod »

public String
findBoatSize() { //code }
public boolean isInflatable()
{ //code }
public boolean
hasDoubleLetters() { //code }
BoatTester Class
Sample Output
Type: Sailboat, Brand: Bertram, Wt: 12.0, Oars: false, Size:
small, Inflatable: false, Doubles: false
Type: Cigarette boat, Brand: Chaparral, Wt: 2000.1, Oars: false,
Size: large, Inflatable: false, Doubles: true
Type: Kayak - inflatable, Brand: BBG, Wt: 15.0, Oars: true,
Size: small, Inflatable: true, Doubles: true
Type: Inflatable Excursion, Brand: Cucchietti, Wt: 20.0, Oars:
true, Size: medium, Inflatable: true, Doubles: true
Type: Jet ski, Brand: Filippi Boats, Wt: 25.0, Oars: false,
Size: medium, Inflatable: false, Doubles: true
Type: Row boat, Brand: Ave Rowing Boats, Wt: 34.0, Oars: true,
Size: medium, Inflatable: false, Doubles: false
Type: Fishing Bass boat, Brand: Burton Water Sports, Wt: 50.0,
Oars: true, Size: large, Inflatable: false, Doubles: false
Type: Yacht, Brand: Lund, Wt: 4200.8, Oars: false, Size: large,
Inflatable: false, Doubles: false
public class BoatTester
{
/**
* @param args
*/
public static void main(String[] args)
{
Boat b0 = new
Boat("Sailboat", "Bertram", 12, false);
Boat b1 = new Boat("Cigarette
boat", "Chaparral", 2000.1, false);
Boat b2 = new Boat("Kayak -
inflatable", "BBG", 15, true);
Boat b3 = new
Boat("Inflatable Excursion", "Cucchietti", 20);
Boat b4 = new Boat("Jet ski",
"Filippi Boats", 25, false);
Boat b5 = new Boat("Row
boat", "Ave Rowing Boats", 34);
Boat b6 = new Boat("Fishing
Bass boat", "Burton Water Sports", 50);
Boat b7 = new Boat("Yacht",
"Lund", 4200.8, false);
//Create a boat with the 4
parameter constructor
//Create a boat with the 3
parameter constructor
//DO NOT MODIFY lines
20-27
//Place all boat objects in
an array
//SOP each boat object from
the array using a loop
}
}
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply