Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/70

Click to flip

70 Cards in this Set

  • Front
  • Back

Plagiarism involves the use of quotations without quotation marks, the use of quotations without indication of the source, the use of another's idea without acknowledging the source, the submission of a paper, laboratory report, project, or class assignment (any portion of such) prepared by another person, or incorrect paraphrasing, from the Park University 2010-2011 Undergraduate Catalog Page 92-93. Students caught plagiarizing any assignment or portion of assignment will:

X- Receive a zero for the current assignment


X- Zero for the previous assignment


X- Could also suffer more severe penalties may also be applied per the Park University catalog


X- Also, in the event plagiarism is detected on a previous assignment the previous assignment grade may be adjusted to reflect the above policy even if the assignment was already awarded a higher grade.

Which of the following are rules for Java code?

Using the dash for subtraction.


Using the / for division.


Using a ; at the end of the line.


X- All of the above

When running a computer Program you should follow a two step process which includes first compiling the program second running the program.

TRUE

Java programs that are embedded in web pages are called?

Applets

Algorithms are written with ________?

Pseudocode

This refers to all the physical components inside a computer?

Hardware components

This refers to the programs that tell a computer what to do?

Software components

Computers have many ways of storing data. Which type of storage below is considered Volatile?

Main Memory

Which type of memory is considered Nonvolatile?

Auxiliary Memory

Select the correct class heading statement from those below:

public class HelloWorld

A sequence of characters surrounded by quotes is called a?

String

Which of the following is NOT a form of an “if” statement?

"else,if else"

To surround a description of what should be placed at a particular position you would use which of the following?

< >

Which flowchart symbol below surrounds print, input, and assignment statements?

Rectangle

Which flowchart symbol below connects the rectangles and diamonds and shows the direction of the logic flow?

Arrow

Which flowchart symbol below surrounds questions (for if conditions and loop conditions)?

Diamond

Which statements cause you to jump back to a previously executed statement?

Looping

Which statements are executed in sequence, one after the other?

Sequential

Which statements contain one or more choices and only one of the choices is executed?

Conditional

Select the correct Loop termination techniques discussed in the chapter.

Counter


User Query


Sentinel Value


All of the above

The name of the Java program’s file must match the name of the Java program’s class (except that the filename has a .java extension added to it).

True

Since Java is case-sensitive, that means the filename should start with a lowercase first letter.

False

Select the proper main method heading from the choices below:

public static void main(String [] args)

Select the proper print statement from the choices below:

System.out.println(“Hello World”);

Which input method from the Scanner class would get the next token "Ken" up to the white space if the input was: "Ken Dewey"

.next();

When writing a trace of a declaration statement why would you put a ? in the declared variables column?

It indicates that there is a variable but that it doesnt have a value yet

Variables that hold decimals should be declared as one of the floating-point data types, which of the following may they be declared as?q

Double or float

What is the default type for a floating point constant?

Double

When using the increment operator (++) how many do you increment?

1

What is the symbol used for the decrement operator?

(--)

What does the != indicate?

Not equal

What does the code equalsIgnoreCase indicate?

That upper and lower case letters are treated the same.

A while loop is what is called a post-test loop.

False

In a do loop it first executes the loop, then checks the condition.

True

In a for loop you know the exact number of loop iterations before the loop begins.

True

In a do loop where is the condition located?

Bottom

What is a nested loop?

A loop within a loop

A Boolean variable is a variable that does what?

Holds the value true or the value false

_______ is when a program checks a user's input to make sure it's valid?

Input validation

Select the logical operators in order for “and”, “or”, and “not”.

&& || !

The Math class contains a named constant PI. What is it's approximate value?

3.14

A ___________ is a class that surrounds a relatively simple item in order to add functionality to the simple item.

Wrapper class

What does API stand for?

Application programming interface

Why would there be no need to import the math class to do math calculations?

It is included in the java.lang package that is automatically imported

What would you use to perform character-related operations?

Character wrapper class

To check if a given character is a digit you need to use isDigit, what type of return value is this?

Boolean

What is the output of the following code segment?




String myStr - "Now is the time for all good me to come to the aide of their country!";System.out.println(myStr.lastIndexOf("e ")); // that is an 'e' and a space

50

What does the conversion character tells the Java Virtual Machine (JVM)?

The type of thing needing to be printed

Precision is?

Both A and B




A. Its syntax consists of a dot and then the number of digits that are to be printed to the right of the decimal point.


B. Applies only to floating-point numbers



Width is?

Specifies the minimum number of characters that are to be printed

The most popular programming technique is called?

Object-oriented programming

A class is a description for a set of _________?

Objects

A class's instance methods specify the behavior that an object can exhibit.

True

A class's instance variables specify the type of data that an object can store.

True

When you apply an access modifier to a member of a class, what are you determining?

How easy it is for the member to be accessed

What is the proper format to call a method called “set” that takes a String as the first argument and then 2 integers as arguments 3 and 4?

set(“Kenneth”, 45, 32);

The object that appears at the left of the dot in a call to an instance method.

calling object

What could be the calling object in the below line of code?cat.setWeight(2);

cat

What are the correct Default values below?

integer types get 0floating point types get 0.0boolean types get falsereference types get null

What method does Java use to pass arguments to methods?

pass-by-value

What is the purpose of assigning one reference variable to another?

So that both reference variables then point to the same object

What is the proper command to compare two strings String1 and String2?

Either String1.equals(String2) OR String1.equalsIgnoreCase(String2)

When passing references as arguments, what happens?

A copy of the address of the argument is passed.

What statement below uses method-call chaining?

car.setMake(“Honda”).setYear(1998).printIt();

Which set of statements below utilizes overloading?

findAverage(20,8);


findAverage(5, 12, 34);


findAverage(2, 3, 4, 5);

What does a constructor do?

It allows you to specify what happens to an object when it is instantiated with new.

Since the parameter and the argument hold the same address value, they point to the same object.

True

A constructor lets you specify what happens to an object when it is instantiated with new.

True

A constructor is NOT called automatically when an object is instantiated.

False

Any time you instantiate an object (with new), there must be a matching ___________?

Constructor