Topic 2.5 Video 1

Topic 2.5 Video 1

11th Grade

5 Qs

quiz-placeholder

Similar activities

Java Basics #2

Java Basics #2

10th - 12th Grade

7 Qs

Java while loops

Java while loops

10th - 12th Grade

10 Qs

CodeHS 2.4 Arithmetic Expressions

CodeHS 2.4 Arithmetic Expressions

9th - 12th Grade

10 Qs

Mon Sep 13 Java Quiz

Mon Sep 13 Java Quiz

10th - 12th Grade

10 Qs

A4 IIIB - Funciones PSeInt & Python

A4 IIIB - Funciones PSeInt & Python

10th Grade - University

10 Qs

Quiz 04 - Input and Output

Quiz 04 - Input and Output

11th Grade

10 Qs

Operators in C

Operators in C

9th - 12th Grade

10 Qs

java_refresh

java_refresh

11th - 12th Grade

6 Qs

Topic 2.5 Video 1

Topic 2.5 Video 1

Assessment

Quiz

Computers

11th Grade

Medium

Created by

Myra Deister

Used 1+ times

FREE Resource

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