wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CS 241 Practice Test Week 1

Total questions: 75

Worksheet time: 2hrs 33mins

Name
Class
Date
1.

A visual organizer developed to graphically show objects and their contents.

a)

Syntax Diagram

b)

Flowchar

c)

Pseudocode

d)

UML/Unified Modeling Language

2.

Design strategy of using pre-existing modules to put together a project.

a)

Object-oriented

b)

Cyclical

c)

Bottom-Up

d)

Top-down/Stepwise

3.

Using the flowchart below, what will be output?

a)

5

b)

10

c)

Nothing

4.

Using the flowchart below, what will be the result if score is 284?

a)

Pass

b)

Fail

c)

Nothing

5.

Using the flowchart below, what will be the result if score is 183?

a)

Fail

b)

Pass

c)

Nothing

6.

Which of the following best describes the purpose of creating a flowchart as part of the design of a computer program?

a)

To ensure that all methods are appropriately linked

b)

To graphically display the steps needed to solve the programming problem

c)

To test and maintain the efficiency of the overall program

d)

To determine the necessary number of global and local variables

7.

The stage in the software system life cycle that writes the program using a suitable programming language.

a)

Testing

b)

Analysis

c)

Design

d)

Maintenance

e)

Implementation (Coding)

8.

The stage in the software system life cycle that manages the software project after it has been rolled out and put into use.

a)

Testing

b)

Maintenance

c)

Implementation (Coding)

d)

Analysis

e)

Design

9.

The process of breaking down large modules of a project into smaller, more manageable modules, a key part of the top down design process.

a)

Bottom - up

b)

UML

c)

Flowchart

d)

Stepwise Refinement

10.

A diagram used to represent the overall structure of an object-oriented class design.

a)

Flowchart

b)

Bottom-up

c)

UML

d)

Top-down

e)

Stepwise Refinement

11.

Development process that combines features of other development models into a cyclical process, including several phases, one of which is risk analysis.

a)

Spiral

b)

Waterfall

c)

Incremental

d)

Agile

12.

The practice of using capital letters and lowercase letters to enhance the readability of programmer created multi-word identifiers for variables, method names, and class names.

a)

CamelCase

b)

Constant Name

c)

Style Conventions

d)

Class Name

13.

A software system is to be developed for which the requirements are well understood and the risk of failure is minimal. To meet these requirements, which of the following software development models would be most appropriate to use?

a)

Incremental

b)

Spiral

c)

Agile

d)

Waterfall

14.

A program is considered to be (a)   when it can handle gracefully any and all negative issues that might occur during program execution, such as bad input or division by zero.

15.

Development process that achieves production in small steps, where design, implementation, and testing occur during each step.

a)

Spiral

b)

Agile

c)

Waterfall

d)

Incremental

16.

A development process currently in use by many software companies that involves the use of sprints on a monthly or weekly basis throughout the span of the project.

a)

Agile

b)

Waterfall

c)

Spiral

d)

Incremental

17.

A system of using rules to control various aspects of the implementation process of a program that enhances readability and functionality, such as indenting, spacing, naming identifiers, use of comments, and documentation.

a)

Psedocode

b)

Try Catch Block

c)

CamelCase

d)

Style Conventions

18.

This technique is used in some programming languages to provide input protection in order to make the program more robust.

a)

CamelCase

b)

Style Convention

c)

Pseudocode

d)

Try Catch Block

19.

This module in some programming languages typically starts with an uppercase letter.

a)

Precondition

b)

Class

c)

Constant

d)

Method

e)

PostCondition

20.

A formal comment block that describes what a process needs in order to be effective.

a)

Postcondition

b)

Try-Catch Block

c)

Precondition

d)

Style Conventions

21.

One of the three pillars of object oriented programming that allows for classes to be defined based on previously defined and developed classes, receiving all of the characteristics of the pre-defined class, and then expanding on those features, identified as an "is a" relationship.

a)

Inheritance

b)

Encapsulation

c)

Composition

d)

Abstraction

22.

In object-oriented programming, this is the process of combining simpler data types into more complex data types, often using the phrase "has a" to describe the relationship.

a)

Abstraction

b)

Composition

c)

Encapsulation

d)

Inheritence

23.

Which object-oriented programming concept is described by the following: A certain class GraduateStudent is partially made up of predefined classes PersonalData and CourseLoad.

a)

Inheritance

b)

Composition

c)

Polymorphism - overloading

d)

Polymorphism - polymorphic references

e)

Encapsulation

24.

Which object-oriented programming concept is described by the following: Class Jaguar is defined based on all the characteristics of class LuxuryCar.

a)

Encapsulation

b)

Polymorphism

c)

Composition

d)

Inheritance

25.

Which object-oriented programming concept is described by the following: Class Car has several methods, all named openDoor, but which work in different ways.

a)

Polymorphism-overriding

b)

Polymorphism-polymorphic referencing

c)

Inheritance

d)

Encapsulation

e)

Polymorphism-overloading

26.

Which object-oriented programming concept is described by the following: Class Cupcake inherited a method from class Dessert and redefined it.

a)

Polymorphism-overloarding

b)

Polymorphism - polymorphic reference

c)

Inheritance

d)

Polymorphism - overriding

e)

Composition

27.

Which object-oriented programming concept is described by the following: A parent class J has child classes K and L, and can reference objects of either class.

a)

Polymorphism - polymorphic referencing

b)

Inheritance

c)

Polymorphic - overriding

d)

Polymorphic - overloading

e)

Encapsulation

28.

Which object-oriented programming concept is described by the following: A process in class H is defined in several different ways, but achieves the same result.

a)

Polymorphism

b)

Inheritance

c)

Encapsulation

d)

Composition

29.

A term in OOP related to encapsulation, sometimes called "information hiding", that indicates the concept where a programmer hides all but the relevant data and processes about an object in order to reduce complexity and increase efficiency.

a)

Inheritance

b)

Encapsulation

c)

Polymorphism

d)

Abstraction

e)

Composition

30.

A programming entity during the actual execution of a program that encapsulates data and related methods into one package.

a)

method

b)

class

c)

object

d)

procedure

e)

function

31.

A programming language using words and commands easy for humans to understand and organize, but which must be translated into machine language or object code for the computer to understand and execute

a)

Low-level language

b)

Objected-oriented language

c)

High-level language

d)

Functional Language

32.

The language directly understood and executed by a computer, consisting of pure 0s and 1s.

a)

Machine Language

b)

Pascal Language

c)

COBOL Language

d)

Assembly Language

33.

A programming language that uses mnemonic opcodes, such as mov, sto, and load, to interact directly with a computer's CPU and registers, used by expert programmers to produce highly efficient and fast programs.

a)

Machine Language

b)

Assembly Language

c)

C

d)

Java

e)

Javascript

34.

A language easily understood and executed by a computer, like machine language or bytecode.

a)

High-Level Language

b)

Low-Level Language

c)

Machine Language

d)

Assembly Language

35.

The rules of punctuation and grammar for a programming language is often referred to as _______________.

a)

Lexical

b)

Syntax

c)

Style Conventions

d)

Commands

36.

Which term below best describes the process where the instructions from a program are converted all at once, and then executed?

a)

Compiling

b)

Interpreting

c)

Evaluating

d)

Translating

37.

One of the original high level languages created by John Backus to make programming easier for math and science applications.

a)

Fortran

b)

Python

c)

C++

d)

COBOL

e)

Java

38.

A compiled, English-like computer programming language designed for business use, designed under the leadership of Commodore Grace Hopper.

a)

Java

b)

COBOL

c)

C++

d)

Pascal

e)

Python

39.

A procedural programming language, named in honor of a 17th century French mathematician, designed in the late 60s by Niklaus Wirth.

a)

Pascal

b)

COBOL

c)

Java

d)

C++

e)

Python

40.

A general-purpose programming language designed in the late 70s by Bjarne Stroustrup as an extension to the C language with object-oriented data abstraction mechanisms.

a)

Python

b)

COBOL

c)

PASCAL

d)

C++

e)

Java

41.

A widely used general-purpose, high-level programming language, with a design philosophy that emphasizes code readability.

a)

Python

b)

Fortran

c)

C++

d)

COBOL

e)

Java

42.

A general-purpose computer programming language that is class-based and object-oriented, where source code programs are compiled into bytecode files, which are then interpreted by each machine based on its own architecture.

a)

Python

b)

C++

c)

Java

d)

Pascal

e)

Fortran

43.

An informal high-level description of the operating principle of a computer program or other algorithm.

a)

Machine Language

b)

Assembly Language

c)

Architecture

d)

Pseudocode

e)

Artificial Intelligence

44.

Identify the data type for this value. 45

a)

boolean

b)

int

c)

float

d)

char

e)

string

45.

Identify the data type for this value. 0

a)

float

b)

string

c)

char

d)

boolean

e)

int

46.

Identify the data type for this value: 3.14

a)

char

b)

float

c)

int

d)

string

47.

Identify the data type for this value. 's'

a)

char

b)

string

c)

boolean

d)

int

e)

float

48.

Identify the data type for this value. " "

a)

float

b)

string

c)

char

d)

boolean

49.

A programmer needs a data type that will store the age of a person as a whole number, but wants to be as efficient as possible to conserve memory. Which of the following choices represents the best choice for this situation?

a)

double

b)

short

c)

int

d)

boolean

e)

float

50.

A programmer has been asked to design a program for a micro-biologist to keep track of data measurements of cellular organisms, which require the highest level of storage precision. Which of the data types listed below would be the best choice for storing this type of data?

a)

float

b)

int

c)

char

d)

short

e)

double

51.

Choose the statement below that best classifies the following identifier example.


float

a)

Invalid - contains invalid symbols

b)

Invalid identifier - contains spaces

c)

Invalid - does not start with a letter or underscore

d)

Invalid identifier - programming language reserved word

e)

valid

52.

Choose the statement below that best classifies the following identifier example.


floated

a)

invalid - contains invalid symbols

b)

valid

c)

invalid - programming language reserved word

d)

invalid - contains spaces

e)

invalid - does not start with a letter or underscore

53.

Choose the statement below that best classifies the following identifier example.

4Gone

a)

Invalid - does not start with a letter or underscore

b)

valid

c)

Invalid - contains invalid symbols

d)

Invalid - programming language reserved word

54.

Choose the statement below that best classifies the following identifier example.

him and her

a)

invalid - contains spaces

b)

valid

c)

invalid - does not start with a letter or underscore

d)

invalid - contains invalid symbols

e)

invalid - programming language reserved word

55.

Choose the statement that best classifies the identifier creation guideline shown.

Variable names should be abbreviated.

a)

Rule

b)

Convention

c)

Good idea

56.

Choose the statement that best classifies the identifier creation guideline shown.

Variable start with a letter or the underscore character.

a)

Rule

b)

Style conventions

c)

Good idea

57.

Choose the statement that best classifies the identifier creation guideline shown.

Method names start with a lower case letter.

a)

Convention

b)

Good Idea

c)

Rule

58.

Choose the statement that best classifies the identifier creation guideline shown.

Class names start with an upper case letter.

a)

Rule

b)

Good Idea

c)

Style convention

59.

Choose the statement that best classifies the identifier creation guideline shown.


Variables start with a letter or the underscore character.

a)

Good idea

b)

Convention

c)

Rule

60.

Select all choices listed below that are within the next five values in this base 8 sequence.

5, 6, 7

a)

8

b)

10

c)

13

d)

11

e)

9

61.

Select each identifier shown with the most appropriate type of identifier category.

1. Name

2. Person

3. VALUE

4. doSomething

5. age

a)

1. name - variable

b)

2. Person - class

c)

3. VALUE - constant

d)

4. doSomething() - method

e)

5. age - function

62.

Which choice best describes the stage in the software system life cycle which determines the structure of the software strategy and code?

a)

Design

b)

Analysis

c)

Maintenance

d)

Implementation (Coding)

e)

Testing

63.

Which of the choices listed represents the greatest value?

a)

11000111 base 2

b)

304 base 8

c)

196 base 10

d)

C3 base 16

64.

Which design process below is most appropriate for a project where the design team has taken the analysis and identified many processes already defined that can be used to develop the project, saving much time and effort.

a)

Objected Oriented

b)

Top down

c)

Bottom Up

d)

Stepwise Refinement

65.

The definition of an object in OOP, describing the type of data owned by the object, as well as methods that act on that data.

a)

method

b)

function

c)

class

d)

procedure

e)

object

66.

An aspect of object oriented programming incorporating related data items and methods into a class definition, including instance variables, constructors, accessor and modifer methods is often referred to as:

a)

Inheritance

b)

Composition

c)

Polymorphism

d)

Encapsulation

e)

Abstraction

67.

Three pillars of OOP.

a)

Inheritance

b)

Encapsulation

c)

Polymorphism

d)

Composition

e)

Abstraction

68.

What is the next value in this binary sequence?

101, 110, 111

(a)  

69.

Identify the data type for this value:

"G"

a)

float

b)

boolean

c)

string

d)

char

e)

int

70.

Select the best choice describing a structured comment block indicating the expected output for a process.

a)

block comment

b)

single line comment

c)

postcondition

d)

precondition

e)

external documentation

71.

Choose the statement that best classifies the identifier creation guideline shown.

Contains only alphanumeric characters, or the underscore character

a)

Rule

b)

Convention

c)

Good Idea

72.

If the character 'e' has an ASCII value of 101, what would be the sum of all the ASCII characters in the word "face"?

(a)  

73.

The fundamental type of data in a computer, the binary digit, or bit, is represented in different ways. Of the choices shown, check each one that is typically used to represent a bit.

a)

warm, cold

b)

1,0

c)

on, off

d)

high voltage, low voltage

e)

true, false

74.

A customer from a startup company approaches a software development company with a software project to serve one of their company needs. A meeting is scheduled to begin the process of determining all aspects of the project during which representatives of the software company ask questions of the customer to ascertain the specific details of the requirements. Which choice represents this part of the software system life cycle?

a)

Implementation

b)

Design

c)

Analysis

d)

Maintenance

e)

Testing

75.

A "readme.txt" file is created to serve as instructions for a software project delivered to a customer. Which choice best describes this feature?

a)

internal documentation

b)

postcondition

c)

precondition

d)

block comment

e)

external documentation