Topic 2.5 Video 1

Topic 2.5 Video 1

11th Grade

5 Qs

quiz-placeholder

Similar activities

Objects & Classes

Objects & Classes

11th - 12th Grade

10 Qs

Sains Komputer (Java) 1: Sintaks Asas & Pembolehubah

Sains Komputer (Java) 1: Sintaks Asas & Pembolehubah

10th Grade - University

10 Qs

Microteaching Cs T4 CTG

Microteaching Cs T4 CTG

9th - 12th Grade

6 Qs

Topic 6.1 Video 2

Topic 6.1 Video 2

11th Grade

6 Qs

Java Data Types

Java Data Types

11th Grade

10 Qs

APCS Printing and objects

APCS Printing and objects

9th Grade - University

10 Qs

Recursion in Java (AP Computer Science A)

Recursion in Java (AP Computer Science A)

9th - 12th Grade

10 Qs

QUIZ PERTAMA PBO

QUIZ PERTAMA PBO

11th Grade

10 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