Course Solutions Uncategorized (Solved) : Java Hw Submarine Class Load Turnon Turnoff Methods Method Receive Time Integer Code Far P Q32238907 . . . .

(Solved) : Java Hw Submarine Class Load Turnon Turnoff Methods Method Receive Time Integer Code Far P Q32238907 . . . .

 

(JAVA HW) In the submarine class, over-load the turnOn andturnOff methods, so that the method can receive a time integer.

This is my code so far:

public class Vehicle {

//attributes

String color;

String model;

//constructor

public Vehicle(String color, String model) {

super();

this.color = color;

this.model = model;

}

//methods

public void turnOn(){

System.out.println(“The vehicle has been turned on”);

}

public void turnOff(){

System.out.println(“The vehicle has been turned off”);

}

}

public class Submarine extends Vehicle {

//attributes

int maxLoad;

int maxDepth;

//constructor

public Submarine(String color, String model, int maxLoad, intmaxDepth){

super(color,model);

this.maxLoad = maxLoad;

this.maxDepth = maxDepth;

}

//methods

public void turnOn(int time){

System.out.println(model + ” will be turned on in “+time+”minutes”);

}

public void turnOff(int time){

System.out.println(model + ” will be turned off in”+time+”minutes”);

}

public void descend(){

System.out.println(model+” has descended”);

}

public void useRadar(){

System.out.println(model+” has used

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Answered) : Q2 Problems Perceive Might Exist Alibaba S Board Terms Decision Making Process Particular Q28171191(Answered) : Q2 Problems Perceive Might Exist Alibaba S Board Terms Decision Making Process Particular Q28171191

<br/><img src="https://media.cheggcdn.com/media%2F6d4%2F6d44b13b-47c9-4119-bf0d-0effe0e888f9%2Fimage" alt="Q2: What are the problems you perceive that might exist in Alibabas board in terms of decision making process, with particular reference to the Alipay case? Case Assignment