logo

Crowdly

Looking for test answers and solutions? Browse our comprehensive collection of verified answers for at moodle.lsu.edu.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Consider the following code snippet:

public class Motorcycle extends Vehicle

{

   . . . 

   public Motorcycle(int numberAxles)

   {

      super.numberAxles; 

   }

}

What does this code do?

0%
0%
0%
100%
View this question

Consider the following code snippet:

public class Motorcycle extends Vehicle

{

   . . . 

   public Motorcycle(int numberAxles)

   {

      super(numberAxles);  //line #1

   }

}

If the line marked "//line #1" was missing, which of these statements would be correct? 

0%
0%
0%
100%
View this question

Consider the following code snippet:

public class Motorcycle extends Vehicle

{

   . . . 

   public Motorcycle(int numberAxles)

   {

      super(numberAxles); 

   }

}

What does this code do?

100%
0%
0%
0%
View this question

Consider the following code snippet:

public class Auto extends Vehicle

{

   . . . 

   public Auto(int numberAxles)

   {

      super(numberAxles); 

   }

}

What does this code do?

100%
0%
0%
0%
View this question

Consider the following code snippet that appears in a subclass:

public void deposit(double amount)

{

   transactionCount ++;

   deposit(amount);

}

Which of the following statements is true?

100%
0%
0%
0%
View this question

If a subclass uses the same method name but different parameter types for a method that appears in its superclass, ____. 

100%
0%
0%
0%
View this question

If a subclass contains a method with the same name as a method in its superclass, but with different parameter types, the subclass method is said to ____ the method of the superclass.

0%
0%
0%
100%
View this question

Consider the following code snippet:

public class Employee

{

   . . .

   public void setEmployeeDept(String deptNum)

   {

      . . .

   }

}

public class Programmer extends Employee

{

   . . . 

   public void setEmployeeDept(int deptNum)

   {

      . . .

   }

}

Which of the following statements is correct?

0%
0%
100%
0%
View this question

Consider the following code snippet:

public class Vehicle

{

   . . .

   public void setVehicleClass(double numberAxles)

   {

      . . .

   }

}

public class Auto extends Vehicle

{

   . . . 

   public void setVehicleClass(int numberAxles)

   {

      . . .

   }

}

Which of the following statements is correct?

0%
0%
100%
0%
View this question

Consider the following code snippet:

public class Employee

{

   . . .

   public void setDepartment(String deptName)

   {

      . . .

  }

}

public class Programmer extends Employee

{

   . . . 

   public void setProjectName(String projName)

   {

      . . . 

   }

   public void setDepartment(String deptName)

   {

      . . .

   }

}

Which of the following statements is NOT correct?

0%
100%
0%
0%
View this question

Want instant access to all verified answers on moodle.lsu.edu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!