Algorithms / Methods

Algorithms / Methods

9th Grade

8 Qs

quiz-placeholder

Similar activities

Grade 9 - User Defined Methods

Grade 9 - User Defined Methods

9th Grade

10 Qs

Project STEM AP CS A Unit 1 Quiz Review

Project STEM AP CS A Unit 1 Quiz Review

9th - 12th Grade

11 Qs

C#  Functions

C# Functions

9th - 12th Grade

6 Qs

Java Class vocabulary

Java Class vocabulary

9th Grade - University

12 Qs

Unit 3 If statements Quiz

Unit 3 If statements Quiz

9th - 12th Grade

13 Qs

Two-Dimensional Array

Two-Dimensional Array

9th - 12th Grade

6 Qs

บทที่ 2 การออกแบบวิธีแก้ปัญหา (ชนิดของตัวแปร นิพจน์ และเงื่อนไข)

บทที่ 2 การออกแบบวิธีแก้ปัญหา (ชนิดของตัวแปร นิพจน์ และเงื่อนไข)

9th - 12th Grade

10 Qs

ArrayList Review

ArrayList Review

9th Grade - University

11 Qs

Algorithms / Methods

Algorithms / Methods

Assessment

Quiz

Computers

9th Grade

Easy

Created by

Shang Lebron

Used 1+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

An algorithm

is fake code.

answers the question "How do I do it?"

is usually well written on your first attempt.

is a set of step by step instructions used to solve a problem.

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Pseudocode

should look like a numbered outline.

is used to help you understand the problem.

is a well structured programming language.

usually looks like a generalized version programming languages.

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

A method

can be declared as void and still return an int

will return an int if its parameters are ints

must have a return type

must have at least one parameter

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

A method variable

can be seen by all methods

must be declared outside of all methods

only exists in the method it was created

is a variable with no parameters

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

GIven

public static int myMethod(int num, String word)

which of the following can not be in the same class

public static int myMethod(String word, int num)

public static String myMethod(int num, String word)

public static int myMethod(int num)

public static int anotherMethod(int num, String word)

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Method overloading is

when two or more methods have the same name

when two or more methods have the same parameters

when two or more methods have the same signature

a method has more than 10 lines of code in it

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which of the following are false?

The methods return type, is the data type of the data the method returns when it is complete.

If you do not want to return any data then the return type must be declared void.

The last line of code in a method must be its final return statement.

A method can return as many pieces of data as it needs to.

8.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which of the following are true?

A method can be declared inside of another method

A class variable can only be changed by the main method

If a method changes a class variable the old value will still be there after the method is returned

A class variable can only be defined outside of any method when it is declared