Deck 1: Introduction

Full screen (f)
exit full mode
Question
In Java, total, ToTal and TOTAL are all different identifiers.
Use Space or
up arrow
down arrow
to flip the card.
Question
Which of the following is not one of the four basic software development activities?

A) establishing the requirements
B) creating a design
C) preliminary practice coding
D) testing
E) implementing the design
Question
In Java, an identifier that is made up by the programmer can consist of ___________________.

A) any characters
B) only numbers
C) only letters
D) only letters, the underscore ( _ ), and the dollar sign ( $ )
E) numbers, letters, the underscore ( _ ), and the dollar sign ( $ )
Question
Which of the following will is considered a logical error?

A) forgetting a semicolon at the end of a programming statement
B) typing a curly bracket when you should have typed a parenthesis
C) multiplying two numbers when you meant to add them
D) dividing by zero
E) misspelling an identifier
Question
Java is _____________________.

A) a procedural language
B) a functional language
C) an object-oriented language
D) a fourth-generation language
E) a spoken-language
Question
Comments affect the run-time execution of a program.
Question
Software requirements specify ____________________.

A) what a program should accomplish
B) which programming language the developer should use
C) how objects should be encapsulated
D) how a solution should be implemented
E) a programming schedule
Question
Classes can be created from other classes by using _______________ .

A) encapsulation
B) polymorphism
C) inheritance
D) attributes
E) machine code
Question
The Java compiler translates Java source code into _____________ .

A) Java bytecode
B) C++
C) assembly code
D) machine code
E) an object-oriented language
Question
An identifier can begin with a digit.
Question
Which of the following lines is a properly formatted comment?

A) // This is a comment
B) /* This is a comment */
C) /* this is a comment
*/
D) both a and b
E) a, b and c
Question
_____________ consists of specific words and symbols to express a problem solution.

A) A programming language
B) Software
C) Hardware
D) A computer
E) An application
Question
Java is case-sensitive.
Question
Which of the following might be included in an IDE?

A) a compiler
B) an editor
C) a debugger
D) all of the above
E) none of the above
Question
Which of the following describes the act of ensuring that a program solves the intended problem in all cases?

A) establishing the requirements
B) testing
C) preliminary practice coding
D) implementing the design
E) creating a design
Question
Which of the following is not a valid Java identifier?

A) answer_7
B) highest$
C) anExtremelyLongIdentifierIfYouAskMe
D) 2ndlevel
E) thirdNumber
Question
The _____________ of an object define it define its potential behaviors.

A) attributes
B) white spaces
C) variables
D) methods
E) name
Question
In order for a program to run on a computer, it must be expressed in ______________________.

A) an assembly language
B) a machine language
C) a high-level language
D) an object-oriented language
E) a fourth generation language
Question
A reserved word can be used to name a method.
Question
A syntax error is a _____________________.

A) a logical error
B) a compile-time error
C) a run-time error
D) a bug
E) an exception
Question
Write an application that prints the first few lines of a song (your choice).
Question
Give three examples of Java reserved words.
Question
Explain the difference between a compile-time error and a run-time error. Give an example of each.
Question
Write a short Java program that outputs your name, your major, and your birthday on three different lines.
Question
These two snippets of code are identical from the point of view of the compiler:
//snippet 1
public static void main(String [] args) {
System.out.println("Hi!");
}
//snippet 2
public static void main(String [] args){System.out.println("Hi!");}
Question
An interpreter is a program that translates code that is written in one language into equivalent code in another language.
Question
What are the primary concepts that support object-oriented programming?
Question
Write a short application that prints out a list of classes that you are currently taking.
Question
Determine a good identifier for each of the following entities in a program that calculates the final grade:
a) A grade on the first test of the semester
b) The total number of tests
c) The total number of homework assignments
d) The relative weight of the tests
Question
Why is ambiguity a problem for programming languages?
Question
Identify the syntax errors in the following snippet of code:
public clas Hello {
public static void main(String [] args) {
Sytem.out.println("Hello Wrld!")
}
}
Question
Name the steps to solving a problem as described by your textbook.
Question
What are some advantages to writing programs in a high-level language instead of machine code?
Question
An object should never be encapsulated.
Question
Identifiers can be of any length.
Question
Write a program that outputs Four Score and Seven Years Ago on six lines, with the words centered relative to each other.
Question
Name the four basic activities that are involved in a software development process.
Question
Explain the difference between the syntax of a program and the semantics of a program.
Question
Write a short Java program that outputs the following:
*
*
*
************** Time flies like an arrow
*
*
*
Question
Syntax rules dictate the form of a program. Semantics dictate the meaning of the program statements.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/40
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 1: Introduction
1
In Java, total, ToTal and TOTAL are all different identifiers.
True
Explanation: Java is case-sensitive, so these three identifiers are all different.
2
Which of the following is not one of the four basic software development activities?

A) establishing the requirements
B) creating a design
C) preliminary practice coding
D) testing
E) implementing the design
C
Explanation: Preliminary practice coding is not one of the four basic software development activities. Establishing the requirements for a program, creating a design for a program, implementing the design and testing the program all occur during software development.
3
In Java, an identifier that is made up by the programmer can consist of ___________________.

A) any characters
B) only numbers
C) only letters
D) only letters, the underscore ( _ ), and the dollar sign ( $ )
E) numbers, letters, the underscore ( _ ), and the dollar sign ( $ )
E
Explanation: In Java, an identifier can consist of numbers, letters, the underscore and the dollar sign, but it cannot begin with a number.
4
Which of the following will is considered a logical error?

A) forgetting a semicolon at the end of a programming statement
B) typing a curly bracket when you should have typed a parenthesis
C) multiplying two numbers when you meant to add them
D) dividing by zero
E) misspelling an identifier
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
5
Java is _____________________.

A) a procedural language
B) a functional language
C) an object-oriented language
D) a fourth-generation language
E) a spoken-language
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
6
Comments affect the run-time execution of a program.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
7
Software requirements specify ____________________.

A) what a program should accomplish
B) which programming language the developer should use
C) how objects should be encapsulated
D) how a solution should be implemented
E) a programming schedule
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
8
Classes can be created from other classes by using _______________ .

A) encapsulation
B) polymorphism
C) inheritance
D) attributes
E) machine code
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
9
The Java compiler translates Java source code into _____________ .

A) Java bytecode
B) C++
C) assembly code
D) machine code
E) an object-oriented language
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
10
An identifier can begin with a digit.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
11
Which of the following lines is a properly formatted comment?

A) // This is a comment
B) /* This is a comment */
C) /* this is a comment
*/
D) both a and b
E) a, b and c
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
12
_____________ consists of specific words and symbols to express a problem solution.

A) A programming language
B) Software
C) Hardware
D) A computer
E) An application
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
13
Java is case-sensitive.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
14
Which of the following might be included in an IDE?

A) a compiler
B) an editor
C) a debugger
D) all of the above
E) none of the above
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
15
Which of the following describes the act of ensuring that a program solves the intended problem in all cases?

A) establishing the requirements
B) testing
C) preliminary practice coding
D) implementing the design
E) creating a design
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
16
Which of the following is not a valid Java identifier?

A) answer_7
B) highest$
C) anExtremelyLongIdentifierIfYouAskMe
D) 2ndlevel
E) thirdNumber
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
17
The _____________ of an object define it define its potential behaviors.

A) attributes
B) white spaces
C) variables
D) methods
E) name
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
18
In order for a program to run on a computer, it must be expressed in ______________________.

A) an assembly language
B) a machine language
C) a high-level language
D) an object-oriented language
E) a fourth generation language
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
19
A reserved word can be used to name a method.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
20
A syntax error is a _____________________.

A) a logical error
B) a compile-time error
C) a run-time error
D) a bug
E) an exception
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
21
Write an application that prints the first few lines of a song (your choice).
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
22
Give three examples of Java reserved words.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
23
Explain the difference between a compile-time error and a run-time error. Give an example of each.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
24
Write a short Java program that outputs your name, your major, and your birthday on three different lines.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
25
These two snippets of code are identical from the point of view of the compiler:
//snippet 1
public static void main(String [] args) {
System.out.println("Hi!");
}
//snippet 2
public static void main(String [] args){System.out.println("Hi!");}
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
26
An interpreter is a program that translates code that is written in one language into equivalent code in another language.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
27
What are the primary concepts that support object-oriented programming?
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
28
Write a short application that prints out a list of classes that you are currently taking.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
29
Determine a good identifier for each of the following entities in a program that calculates the final grade:
a) A grade on the first test of the semester
b) The total number of tests
c) The total number of homework assignments
d) The relative weight of the tests
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
30
Why is ambiguity a problem for programming languages?
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
31
Identify the syntax errors in the following snippet of code:
public clas Hello {
public static void main(String [] args) {
Sytem.out.println("Hello Wrld!")
}
}
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
32
Name the steps to solving a problem as described by your textbook.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
33
What are some advantages to writing programs in a high-level language instead of machine code?
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
34
An object should never be encapsulated.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
35
Identifiers can be of any length.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
36
Write a program that outputs Four Score and Seven Years Ago on six lines, with the words centered relative to each other.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
37
Name the four basic activities that are involved in a software development process.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
38
Explain the difference between the syntax of a program and the semantics of a program.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
39
Write a short Java program that outputs the following:
*
*
*
************** Time flies like an arrow
*
*
*
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
40
Syntax rules dictate the form of a program. Semantics dictate the meaning of the program statements.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 40 flashcards in this deck.