Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

Practice MT2: Q2 (And Vocab. Lists)

+9 votes
What are the answers for question 2 on the practice test (parts a-d), fill in the blanks.

Also, what other vocabulary words do you think should be studied?
asked Jan 25, 2015 in (Winter 14) by Forrest Stonedahl (3,438 points)
edited Jan 26, 2015 by Forrest Stonedahl

4 Answers

+1 vote
a. formal, actual

b. private

c. imported

d. casting

Roundoff error is another vocabulary term to take note of.
answered Jan 25, 2015 by Greg Larson (100 points)
WARNING: one of these 4 is INCORRECT.  Other answers, anyone?
Letter B is wrong.  The answer is overloading.
+1 vote

More vocab words suggested by the 211 section 1:

Pixel - a small dot of color that composes an image (in rows & columns).

Formal Parameter : the variable in the method header, which the value gets assigned to, when the method is called.

Actual Parameter : whatever is being *passed in* to the method, when it is invoked/called.

Console input  (see also Scanner)

Return statements

boolean (true/false) expressions

conditional statements - IF/ELSE IF/ELSE etc.

loops - FOR & WHILE

Let's come up with more!

answered Jan 26, 2015 by Forrest Stonedahl (3,438 points)
edited Jan 26, 2015 by Forrest Stonedahl
+1 vote

211 Section 2 spontaneous vocab list:

Know some string methods like: charAt, indexOf, endsWith ?

token - a unit of user input, generally separated by whitespace, coming from the Scanner.

index - a integer used to describe a location (e.g., "k" is at index 2 in the string "yak")

return - passing BACK a value from a method to wherever it was called (roughly speaking)

initialize (a variable) - before a loop, it's often good to give a variable some initial value... e.g., initialize sum to 0 before accumulating more values with it.

declaration - declaring a variable before using it -- must specify the type of the variable.  Also, we declare methods, and what their return types and parameters are...

answered Jan 26, 2015 by Forrest Stonedahl (3,438 points)
+1 vote

Here are some other vocab. words to study:

"primitive types" vs. "object types"

"static method" vs. "instance method"

variables vs. constants  (which are declared final in Java).

logical operators (&&, ||, !) vs. relational operators (<=, <, ==, !=, >, >=)  (yes, they all evaluate to boolean true/false values, but their operands are different types of data!)

floating point numbers vs integers

definite vs. indefinite loops

statement vs. expression vs. method

"constructor" -- a special method that we call to CREATE a new object, e.g. when we do
        new Scanner(System.in)
or     new DrawingPanel(600,400)

The Scanner's "constructor method" takes in one parameter, whereas DrawingPanel takes in two (two integers representing the width & height)

answered Jan 26, 2015 by Forrest Stonedahl (3,438 points)
edited Jan 27, 2015 by Forrest Stonedahl