programming

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Which statement is valid as a for loop condition?

(int x=0; x < =5; x++)

Which of the following symbols is used to signify a closing tag?

/

Which range of values would result in 10 elements stored in an array?

0-9

Match the Confirm Order Button process to the order in which it takes place.

1. A control is created for the Confirm Order Button and code is written. 2. The event handler changes the property of the lblOrderConfirm message to Visible=True when the click event occurs. 3. The message "Tickets are printing. Enjoy the show!" is displayed.

How many times would the statement in the following for loop run? for (int x= 4; x <=10; x++)

7

Synthesis

A unified understanding of the project that combines the needs of client and users, the limits of available resources, and the data provided by researchers is provided.

Which statement is not true about arrays in Java?

An array of characters is a string.

bug

An error in a program.

Match the descriptions on the left with the terms on the right.

Assigning values to an array = populating Wetting up a memory address = declaring Copying a Java method = instantiating

How is the break statement similar to a continue statement?

Both involve transfer of program control.

What is the purpose of using a pair of square brackets when defining a multi-dimensional array?

Brackets define the size of the array.

creativity

Code that embodies the hopes and goals of client and user is written, within the clear framework and documentation of the program structure.

a0 brackets are essential when coding loops.

Curly

What should you do when you are programming?

Document the program.

Which key is used to halt the execution of an infinite loop in Java?

ESC

It's a method of referencing an address as a value

How does passing by reference work in Java?

HTML stands for which of the following terms?

HyperText Markup Language

abstract

Java keyword creating a class whose member objects cannot be implemented, but can be instantiated into copies

Match the phrases on the left and the Java keyword(s) on the right.

Making a decision. if-then Accessing anywhere. public Repeating action. for

What is the purpose of declaring modifiers when writing a Java class?

Modifiers define how the class can be accessed.

a0 dimensional arrays consists of many rows and one column.

Single

Why is it important to use square brackets ( [ ] ) when creating an array in Java?

Square brackets are used to denote the elements of the array.

Which of the following would be at the beginning and end of the code for the Confirm Order button?

Sub, End Sub

An infinite while loop is produced when the condition being tested is always true.

T

Classes are the fundamentals of object-oriented programming languages.

T

If a program includes only a few individual variables, then passing by value works fine.

T

Java is an object-oriented programming language.

T

In a while loop, what would happen if the condition tested is false?

The computer skips to execute the next statement after the loop.

When writing a loop in Java, why is it important to use the curly brackets { } after the opening statement?

The curly brackets are used to enclose statements to be repeated.

If you write the statement below in a Java program, what action would the computer take? Statement: myGrades[3][5] = x * 10;

The value of x * 10 is stored in the 4th row and 6th column of the array.

Which of the following conditions must be met for a language to be a true programming language?

Turing complete

package

a group of related classes that can be imported into a Java program

Class.object.method is an example of using the a0 to access the elements of a class.

a0 - dot operator

A(n) a0 is a group of saved related classes that can be imported into a Java program.

a0 - package

HTML coding for an image should include at minimum the src element and one other element. What is the second element that must be included?

alt text

In terms of equitable access to the Internet, sight-impaired individuals can greatly benefit from the use of a0.

alt text

Suppose a client runs a fitness program and wants to store information about customers: height, weight, measurements. What type of programming would work best?

array

a structure that holds multiple values of the same data type

array

Microsoft Visual Basic is derived from a0, an early programming language developed in 1964.

basic

high-travel professional in need of reliable web connectivity

built-in 4G web subscription in a durable high-powered notebook/tablet convertible

java initiated constructor

class constructor automatically created by Java that resets all its object values to default (null)

user defined constructor

class constructor that allows object values to be set to non-default (null) values

poor understanding of contract specifications

communicate in greater detail with the clients

What kind of operator is used to write a condition statement in a Java loop?

comparison

Java requires that your program be successfully a0 before it can be run/executed.

compiled

In Visual Basic, a0 are elements that initiate events.

controls

How would you maximize the use of a class?

create subclasses from a superclass

What does the < a > tag do?

creates a link to somewhere else on the same page, or another page

Iteration

do something more than one time, as in a loop

element

each indexed, subscripted, instance of an array variable

basic

early user-friendly programming language and the foundation for Visual Basic; abbreviation for Beginner's All-Purpose Symbolic Instruction Code

a value that is indexed and subscripted

element

Which pair of terms is related?

element, value

Boolean default values in a Java-initiated constructor are set to a0.

false

the language that enables information to be displayed on web browsers; abbreviated HTML

html

After the beta version has been tested, a product will go through final a0, followed by general release.

modification

Which phrase is similar to a hidden Java class?

private class

What prevents access except for elements contained within a class?

private keyword

infinite loops in the software

review the program logic to streamline and improve the code structure

all databases are constructed using at least one matrix of these

rows and columns

When declaring the data type for a multidimensional array of strings, which statement would be most appropriate?

string[ ][ ] myArray;

array

structure that holds multiple values of the same data type

When you tap an icon on your smartphone, this action is an event, or a user-initiated action that will cause a computer program to execute a a0, or a specified set of actions.

subroutine

decrement

to decrease by 1; performed by postfix (x--) and prefix (--x) operators

++x and x++ operators

unary operator

Match the symbol on the left with its opposite on the right.

!= = ++x x-- / integer

Match the operation on the left with the symbol on the right.

% modulus ^ exponentiation * multiplication

How many times would the for loop below execute if variable times = 9 % 2? for (int x=times; x <=times; x++) ?

1

Match the element of basic architecture in event-driven programming to the order in which it is created.

1.dragging GUI elements onto a workspace 2.dropping in some code 3. testing the functionality of a prototype

The while loop listed below would print the phrase, "Hello World, it's {number} degrees" ______ times. int x = 90; while (x < 95) { system.out.println ("Hello World, it's " +x " degrees"); x++; }

5

Complete the statement below using the correct amount. The number of values stored in the multi-dimensional array defined below is a0. someNumbers = new int [5][10];

50

Which of the following represents the proper way to code a link using HTML?

< a href="http://allrecipes.com/recipes/bbq--grilling/main.aspx" > Click here for < b > delicious< /b > BBQ recipes!< /a >

Which of the following represents the correct way to code text 'Hello' as bold using HTML?

< b > Hello< /b >

Which of the following tags is used to indent a section of text?

< blockquote >

Which of the following tags will bold text?

<b>

Which of the following is a script that enables servers to assign content generation to executable files?

CGI

Which of the following summarizes an advantage of WYSIWYG web for page editors?

Creating a web page is easier and faster with WYSIWYG than with HTML.

Choose the application where you will you encounter tables of data.

Excel

Which of the following are common browsers?

Explorer, Firefox, and Chrome

An array is a programming structure designed to hold just one variable.

F

Desk checking consists of working through one's storage areas, tidying up whatever is out of place.

F

Event-driven programs consist of only one event detector or event handler, the coded action that occurs in response to an event.

F

When you save an HTML file, you must add the extension .html to the name.

F

Abbreviated a0 is the language that enables information to be displayed on web browsers.

HTML

alt

HTML attribute that identifies alternative text used to describe an image for sight-impaired viewers or if it does not load

src

HTML attribute that identifies the location of an image file

Match the term on the left with the noun on the right.

IDE = a software package PEMDAS = a sequence IPO = a chart

Explain why, in order to avoid infinite loops, programmers must update the variable in the loop.

If its not updated it will keep going because it doesnt have a reason to stop(?)

Briefly explain a difference between an information interview and a job interview.

Information interview - you gather information & ask questions about the field you may be interested in Job interview - the employer asks you questions to see if they'll hire you

What does the statement below accomplish? classGradesArray = new int[25];

It defines an array to store 25 integers.

Explain why < !DOCTYPE html > is a required HTML tag, but not an active one.

It tells the browser that it's reading an html file

Why is it necessary to declare an array in Java? Choose the best answer.

It tells the computer the beginning address in memory.

When would the associated code block be executed for the statement: do {code block} while (condition)?

Once at the beginning of the loop, and then if the condition is true

Why are packages important in programming in Java? Choose the best answer.

Packages are prewritten code that can be used in programs.

After opening the Visual Basic IDE and selecting to create a Window form for the Movie Ticket Kiosk, the window opens with a small form in the workspace. To continue, drag the sizing handlers to resize the form, and then name it Movie Ticket Kiosk. Which of the following describes the next step?

Select controls from the toolbox and then add them to the form.

In the employee salary class example, the EmployeeSalary class was used to create an object called internEmployeeSalary.

T

The syntax for commenting in Visual Basic is to place an apostrophe at the beginning of each comment line.

T

When declaring an array, you begin by stating the data type of the values it will hold.

T

What is the difference between using "x++" and "x==" in a Java program?

The first increments the value of x; the second compares x to a value.

Which statement is true about constructors?

User-defined constructors must have the same name as the classes they are copying.

Which of the following describes why Visual Basic is easier to use than Basic?

Visual Basic uses the drag-and-drop program elements to drop onto a workspace.

organization that develops and maintains standards for the web and HTML

World wide web consortium

How would you classify passing by reference?

a method of referencing the address as a value

What is required at the end of every Java statement?

a semicolon

A loop statement that would postfix decrement the variable y by 1 would be a0.

a0 - y --;

Match the description on the left with its term on the right.

abstract - a keyword that is merely the cookie cutter to start the design of another structure classes - referred to as hidden when they are declared private—meaning that only the methods within that class can access its variables concrete - an instantiated copy of a class that gives the structure, variables, and methods that can be modified

WYSIWYG

acronym for What You See Is What You Get; describes software that enables developers to work in a visual environment that displays what a user will see, while generating code in the background

Suppose you are writing Java code and find it necessary to perform a repetitive task and you want to encourage the user. What would you use?

continue

Which keyword is used within a loop to transfer program control back to the beginning of the loop?

continue

Which symbols are most appropriate to use to enclose a code block for a do-while loop?

curly brackets {}

developed to efficiently store and manage large amounts of data

databases

a diamond shape that indicates branching of the program flow based on a condition

decision

If you need to construct a class in Java, which sections do you need to write?

declaration, variables, and methods

method of creating GUI-based programs in a visual environment by placing components on a workspace

drag-and-drop programming

cultural fluency

enables the designer to make appropriate choices in style and tone for the intended end user

A software designer delivers software that displays simplified Chinese characters to a client in Taiwan, a nation that uses only traditional characters. This makes the interactive material distracting and difficult for Taiwanese users to read.Rather than a failure in program logic, this would be considered a flaw in the execution of the user a0.

interface

inappropriate cultural cues

interview stakeholders to determine tastes and responses to user interface

An iterative or repetitive action performed on code between the loop's curly braces

loop

Which two keywords are related?

loop, condition

What does the src element in an image tag code indicate?

name and location of the image file

What keyword is used to create a class or array?

new

Which keyword copies a Java object so that the computer can assign memory addresses to its elements?

new

a0 is a Java keyword required to instantiate a Java object.

new

What is the difference between a prefix and postfix in Java?

prefix - precedes, increments or decrements postfix - follows variable & expression, increments or decrements

a rectangle depicting one distinct action in a program

process

What are the first two steps of the SDLC?

requirements, then design

plain fonts

simplify reading and increase the transparency of the interface

The syntax and concept of multidimensional arrays builds upon the basic structure of _____.

single arrays

subroutine

specified set of actions, or method, in a Visual Basic program

severe arthritis, unable to type or use a mouse on a reliable basis

speech recognition controls plus oversize ergonomic joystick manual control.

Which term describes how content in an array is accessed?

subscript

URL

the Internet address of a website; short for Uniform Resource Locator

user interface

the combined hardware and software with which a user directly interacts to accomplish tasks

Which statement would describe an assignment of a value to an array?

trainArray[4]=5;

If you press the enter key in your source code, the browser does not interpret it. Which of the following is the best way to get the browser to understand a break?

use a < p > tag

Since the < title > tag is located in the < head > section of an HTML document and does not show up in the actual webpage, what could you do to have the title show up prominently in your webpage?

use an < h > tag

What would you recommend using if you wanted to set member variables to certain values?

user-defined constructor

event

user-initiated action that causes a program to execute a specified subroutine

information hiding

using the private access identifier so that information is only available to the elements of the class in which it resides

What does WYSIWYG stand for?

what you see is what you get

inexperienced with technology

intuitive graphic interface, plenty of help cues

Which of the following tags will produce the smallest heading?

<h6>

How are postfix and prefix similar?

Both are used to increment or decrement variables.

dot operator

the period (.) placed between the class name.object name.method name; or placed between the object.memberVariableName

Which of the following is the correct nesting order of basic HTML syntax?

< html > < head > < title > < /title > < /head > < body > < /body > < /html >

Which of the following is the best way to bold, italicize, and underline the name Sally Jones?

< i > < b > < u > Sally Jones< /u > < /b > < /i >

Match the HTML code with what it indicates to the web browser.

< img src="Hamburger_medium.png" alt="Cheeseburger illustration with lettuce, pickle, and tomato" > image file name, location, and alt text < img src="Hamburger_medium.png" > image file name and location < p >< a href="http://vector.me/" > < img src="Hamburger_medium.png" alt="Cheeseburger illustration with lettuce, pickle and tomato" >< /a >< /p > image link, file name, location, and alt text

Which of the following HTML tags indicates the main content of a web page?

<body>

href

HTML attribute that identifies the targeted location of a link

Which of the following tags is used to separate sections of text in a document with a horizontal line?

< hr >

Which is the correct way to code text 'Thank you' as italicized using HTML?

< i > Thank you< /i >

Which of the following represents the proper way of coding an image in HTML?

< img src="Hello.png" alt="Hello sign on the lawn" >

Which of the following HTML codes is correct for an ordered list?

< p > My Favorite Foods:< /p > < ol > < li > Pizza< /li > < li > Pasta< /li > < li > Steak< /li > < /ol >

Which section of an HTML document includes the primary information about the file, including styles and scripts?

<head>

tag used to insert a paragraph break; used in pairs

<p>

tag used for the name of a web page to be displayed on a browser bar, tab, and bookmark and in a search engine result

<title>

tag used for an unordered (bulleted) list

<ul>

Match the key or symbol on the left and its use on the right.

= assign a value ESC halt a loop { assign a value

How are postfix and prefix operators similar?

Both are used to increment or decrement variables.

Explain why it is important to learn the basics of HTML even though web-creation software is available that generates the HTML code for you.

It's important because it gives you a better understanding of what you're working with

Which option identifies what helped make Blake's experience possible in the following scenario?Blake spends a lot of time looking up information on the Internet. He plays games, takes surveys, and looks at sites dedicated to interactive activities.

Java

What automatically resets all its object values to default (null)?

Java-initiated constructor

Which option identifies what helps Trevor enjoy his hobby in the following scenario?Trevor writes a weekly blog on professional baseball players. This is a hobby he enjoys that does not cost him any money.

PHP

What is the difference between multidimensional and single dimension arrays?

Single dimension arrays have one column, and multidimensional arrays have multiple columns.

Of what model is the development of the many iterations of the Windows operating system an example?

Spiral Model

How do the statements below differ in purpose? Statement A: int[ ] trainArray; Statement B: trainArray = new int [10];

Statement A declares the array in memory, and Statement B defines the size of the array.

The default condition for the "Tickets being printed," message at the bottom of the form is Visible=false.This message cannot be seen while a customer is specifying an order. Which of the following describes what happens to the lblOrderConfirm message once the customer clicks the Confirm Order Button?

The new message is Visible=True.

analysis

Various aspects of the project are broken into discrete parts that can be resolved separately, but that will work as a united whole.

Which option identifies the cause of the message displayed in the following scenario? At a movie ticket kiosk, after the patron presses the Confirm Order button, the message displays that the tickets are being printed.

a Click event triggers the subroutine to display the message

prototype

a model of a product, process, or program created to check and refine its functionality

What happens when a < p > tag is used in HTML?

a new paragraph is created

rapid application development

a programming approach that minimizes pre-planning in favor of creating quick prototypes to test and refine

reference

a storage that contains the memory addresses of an array's values

constructor

a template of an existing class used to create copies of the class

class

a template or cookie-cutter that can be used to instantiate (copy) its standard features to a new object

subscript

a term for the number indicating the position of an element in an array; also called the index

Complete the statement below using the correct term. The difference between do-while and while looping is that the condition in a do-while loop is tested a0 the statements are executed.

after

multidimensional array

an array arranged like a matrix of rows and columns that holds more than one value and/or data type; related data stored in one memory structure that is referenced using two subscripts

Which of the following best describes an index of an array? Choose the best answer.

an integer

loop

an iterative or repetitive action performed on code between the loop's curly braces; common types are for-loops, while loops, and do-while loops

Match the HTML code with what it indicates to the web browser.

an unordered list < ul > an ordered list < ol > an item in a list < li >

What do many IT professions require? Select all that apply as noted in this lesson.

analytical skill design skill

_____ can download a free copy of Visual Studio Community 2017.

anyone

The syntax for commenting in Visual Basic is to place a(n) a0 at the beginning of each comment line.

apostrophe

Which of the following is small Java code script that adds functionality to web pages in a browser?

applet

user-friendly

description of products with high usability and transparency, whose function is either pleasant or nearly invisible to the user

A flowchart of a program's logic and flow is part of which stage of the SDLC?

design

Which statement best describes the logic in a while loop?

determining if there is rain before bringing an umbrella

Which loop will always run at least one loop?

do-while

well-structured program logic

ensures software fulfills its function in an efficient manner that recognizes and solves likely issues of use

The a0 key can be used to stop the computer from executing a code block in an infinite loop.

esc

What do the for loop, do-while loop, and while loop have in common?

evaluates a test condition uses numeric values in counter variable

model in which program actions are initiated and controlled by events such as a mouse click

event-driven programming

requirements research

first stage of the software development life cycle (SDLC)

an arrow that depicts the direction of control in a program

flow line

Which type of loop runs iterations as long as the statements are true only to move on when the statements are false?

for

Which of the following is the correct syntax to begin a for loop?

for (int x=1 ; x< =5; x++);

Java code creating a repetitive process that occurs as long as a condition is true; condition is evaluated at the top of the loop; used when number of loops is known.

for loop

What is the Java code to create a repetitive process when the number of loops is known?

for loop

What loop should be used when the number of loops is known?

for-loop

Which of the following would be used to tie together websites for airline ticket sales and hotel reservations?

glue language

In addition to considering usability for mainstream users, it is important to accommodate people who _____.

have impairments that limit their use of traditional computer tools

Which of the following filename extensions is used for a browser to interpret and display a webpage?

htm

coded text on an electronic device that accesses other information via user actions such as a mouse click or tap on a tablet

hypertext

In which stage of the SDLC do programmers write code?

implementation

object

in Java, the instantiation of a class, having both inherited and assigned properties

control

in Visual Basic, elements on a form that can initiate events

attributes

in Visual Basic, the properties of controls and other elements that determine their appearance and functionality

Choose the word that best describes the "++" operator.

increment

In Java code, what is used to increase by 1?

increment

A array is a variable name that holds multiple values of the same data type that are referenced through a(n) a0 number.

index

Complete the statement below using the correct term. An array a0 is similar to a subscript in that it is used to reference the contents of the array.

index

always one less than in a literal, visual representation of the array

index of an element

What would you recommend, given the scenario below? Situation: You are a programmer, and you need to create an array in Java using the most efficient method. Which of the following possibilities of declaring an array is best?

int trainArray[] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };

graphical user interface

interaction with a computing device using images rather than text; abbreviated GUI and often pronounced gooey

A(n) a0 is another word for loop in Java.

iteration

public

keyword access modifier indicating that objects can be accessed from any class

private

keyword access modifier indicating that objects can only be accessed within their own class

import

keyword telling Java to bring code packages into the program for use

infinite loop

loop structure in a program for which the test condition is never false, so the loop runs endlessly; can be stopped by pressing ESC key

instantiate

make a copy of a class

drag-and-drop programming

method of creating GUI-based programs in a visual environment by placing components on a workspace

event handler

method or subroutine in a program that executes an action in response to an event

event-driven programming

model in which program actions are initiated and controlled by events such as a mouse click

Match the term on the left to symbol on the right.

modulus % not equal != comparison ==

used by programming code for databases

multidimensional arrays

Match the assignment on the left with the description on the right side.

myGrades[1][0] = 90; The value is assigned to row 1 and column 0 of the array. myGrades[1][1] = 100; The value is assigned to row 1 and column 1 of the array. myGrades [0][1] = 'A'; The value is assigned to row 0 and column 1 of the array.

Which statement will access the first element of an array?

myPayChecks[0]

keyword required to create a new object of the designated type and assign a memory address to it

new

What is the name of the value assigned to a declared array variable before it is defined?

null

hidden

objects assigned the private access operator so they are not available to members outside their own class

Declaring single arrays is done with a0 set(s) of straight brackets.

one

To create a a0, you simply write separate source files for each class, and save them in the .java format.

package

a collection of related classes that can be saved and imported for use in other programs

package

What tool would you recommend using to streamline programming in Java?

packages

The < b > tag and < p > tag are similar in that they both are used in a0, whereas the < img > tag and < hr > tag are not.

pairs

A designer is developing a user interface for a new simulation video game whose intended purchasers are dedicated gamers, and who would be glad to provide input. Because demanding users with preferences and deep knowledge of the required tasks will employ the interface, the designer is likely to use the a0 design model for implementing user-centered design.

participatory

Which phrase defines a method that sends a copy of the value of a variable between methods?

passing by value

example: x++ is the same as x=x+1

postfix

When analyzing prefix and postfix operators with the example X=X+1, what is the main difference?

postfix is x++ and prefix is ++x

example: ++x is the same as x=x+1

prefix

Which statement would be valid in declaring a public class called SomeClassName?

public class SomeClassName

Href and src elements must be within which type of enclosures?

quotations

programming approach that minimizes pre-planning in favor of creating quick prototypes to test and refine

rapid application development

Which term accurately denotes a memory address of an array value? Choose the best answer.

reference

Which term best describes the purpose of an index in an array? Choose the best answer.

reference

Information describing how each phase of the software will work is part of which stage of the SDLC?

requirements

Which stage of the SDLC is represented by the following statement? Program Procedures: Patrons enter beverage and dining selections from a touch screen menu at their table.

requirements

Methods of evaluating the needs of end users can occur throughout the development period, as in the case of participatory design, or a model such as contextual design can occur at the beginning, during the requirements a0 phase of the software development life cycle.

research

the basic elements of HTML that format information and media for display on a web page; uses codes enclosed in angle brackets: <>

tags

standardized placement of elements

takes advantage of preexisting customer expectations regarding layout

index

the sequential number of an element in an array variable; the computer begins the array sequence with zero (0)

Where will the words "Jessie's Jammies" appear when < title > Jessie's Jammies< /title > is used in an HTML document that is displayed in a browser?

the top of the browser window

In Java code, what means doing something more than one time?

to iterate

Complete the statement below using the correct term. Passing by a0 involves sending and receiving a copy of the value of a variable.

value

Which statement can be used to pass a memory address to a method?

variableName[x] = getArrayName (variableName, x);

Which option identifies the stage of the SDLC in which the problem was most likely discovered in the following scenario? The customer does not have a Social Security number, so he or she cannot use the online reservation system.

verification

Which stage of the SDLC is represented in the following scenario? An engineering firm hires a group of college students to beta test mapping software. The students discover that the software directs them down one-way streets the wrong way.

verification

Which of the following uses a Microsoft tool that enables drag-and-drop applications?

visual basic

When does an image need to include a file path for where the image is saved?

when the image is saved in a place other than the HTML file

When is a for loop used in a Java program?

when you already know how many times to perform an action

When comparing while loops and do-while loops, what is the main difference?

where the test condition is located in the loop

The a0 loop initializes the counter variable first, outside the loop.

while

As you are learning a client's programming needs, you realize the program will require an iteration of tasks, yet there are exceptions when the task will not be performed. What type of loop should you use for the exceptions?

while loop

W3C is the organization that develops and maintains standards for the Web and HTML. What does W3C stand for?

world wide web consortium

How is "x- -" interpreted in a Java statement such as a do-while?

x is decreased by 1

If you are creating a loop statement in Java, which data type should not be used?

a string literal

The keyword while in a while loop comes after the loop code block.

F

What does "++" do to a variable?

It increases the value of the variable by 1.

do-while loop

Java code creating a repetitive process that occurs as long as a condition is true; condition is evaluated at the bottom of the loop; used when number of loops is unknown

for loop

Java code creating a repetitive process that occurs as long as a condition is true; used when the number of loops is known

Match the instructions on the left with the terms on the right.

PEMDAS: follow a set of mathematical operations do-while: Execute first and then test a condition. instantiate: Copy a class for future use.

How are passing by value and passing by reference different?

The first uses a copy of the value, and the second uses a memory address.

What would happen during compile time if you declared a variable as int myCar and then later referred to the variable as myTruck?

You would receive an error message.

prefix

a shortcut to increment or decrement a variable; the result is calculated and stored, then the variable is used ; example: ++x is the same as x = x+1

postfix

a shortcut to increment or decrement a variable; the variable is used, then the result is calculated and stored; example: x++ is the same as x = x+1

Why would you choose: int trainArray[] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100 }; instead of int[] trainArray = new int[10]; when you declare an array of a certain data type and size?

because this approach requires much less code

Which line of Java code correctly declares an array of character variables?

char[ ] variableArray;

Java code creating a repetitive process that occurs as long as a condition is true; condition is evaluated at the bottom of the loop; used when number of loops is unknown.

do-while loop

When creating a loop, which would you use in order to have the condition evaluated at the bottom of the loop?

do-while loop

When comparing the use of loops, what loop would you use if only numeric values will be used?

for loop

Match the scenario on the left with the appropriate loop on the right.

for loop: repeat known number of times do-while loop: perform first then test while loop: test first then perform

Which describes the purpose of the continue statement in Java?

go back to the beginning

Which statement describes the index number of an array?

identifies each element

A(n) a0 loop occurs when a condition is always tested as true in a loop.

infinite

You need to create a do-while statement comparing whether a student's grade is lower than 65. Which variable type would be appropriate? Choose the best answer.

int

continue

statement used within a loop so that when a certain condition is met, control of the program is forced back to the beginning of the loop

new

the keyword required to instantiate a Java object so that the computer can assign memory addresses to its elements

unary operator

the prefix (++x) and postfix (x++) operators; unary because only one value is used

desk check

the process of running through code step by step and entering and recording values to check the logic; another form of debugging

increment

to increase by 1; performed by postfix (x++) and prefix (++x) operators

The a0 operator can be prefix or postfix and is used to change the value of a variable.

unary

null

unique value assigned to a declared array variable before it is defined; null in place of a memory location

Which word can be used to describe the nature of a for loop?

again


Ensembles d'études connexes

Dywall Application and Finish (Chap. 67-69)

View Set

ACSM Quiz Domain I: Initial Client Consultation and Assessment

View Set

Naming and Storing Website Files Quiz

View Set

LearnSmart Chapter 8 Microbiology Assignment

View Set

History of Rock and Roll test #3

View Set

Primavera World History A Unit 4: Exploration, Encounters, and Exchanges

View Set