Search Header Logo

Topic 2.5 Video 1

Authored by Myra Deister

Computers

11th Grade

Used 1+ times

Topic 2.5 Video 1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Make sure you view the video on AP Classroom.

Given the method signature double calcAverage(int num1, int num2, double num3)

What type of data will the method return?

int
boolean
String
double

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A programmer is asked to create a method that calculates and returns the net salary for an employee's pay stub. The gross salary, tax rate, and other deductions are needed to calculate the net salary.

What would be the most appropriate method header for this method?

Media Image
Media Image
Media Image
Media Image
Media Image

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the code to the left.

What is the output of the following code for an object dinner of type Eatout?

System.out.println(dinner.haveDinner(haveDinner(haveDinner("Vege Burger"))));

The Payment is: $15.00

THe payment is : $ 15

The payment is $ 15

The payment is $ 18.00

The payment is : $ 18

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the class definition at the left.

Which of the following calls to the method calculateTotal is valid?

int pay = calculateTotal(50, 20.5);

pay = calculateTotal (50, 20.5);

double pay = calculateTotal (50, 20.5);

double pay = calculateTotal (50.6, 20.5);

boolean pay = calculateTotal (50, 20.5);

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following code.

public double shapes (int numberofSides, double length)

{

//missing code

return measure;

}

Which of the following choices would best replace //missing code?

Media Image
Media Image
Media Image
Media Image
Media Image

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?