What is an advantage of using an integrated development environment?
What operator has the lowest precedence?
In pseudocode, a(n) ____ statement is used to clearly show where the selection structure ends.
A structure that includes separate actions when an expression is true and when it is false is called a(n) ____ structure.
In a flowchart or in pseudocode, you can use the symbol that mathematicians use to mean “not equal,” ____.
Programmers must be careful to use the correct ____ in the statement that controls a loop.
Programmers use the term “____” to describe programs that are well designed and easy to understand and maintain.
A(n) ____ is a series or list of variables in computer memory, all of which have the same name and data type but are differentiated with special numbers called subscripts.
Every array has a(n) ____ size.
Users enter incorrect data frequently; a good program should be able to handle the mistake and not allow the ____ to be out of bounds.
Modularization provides ____.
Programmers say that variables and constants declared within a method are ____ only after declaration within that method.
____ variables and constants are those that are known to an entire class.
Programmers refer to hidden implementation details as existing in a ____.
A method’s name and parameter list constitute the method’s ____.
You can indicate that a method parameter must be an array by placing ____ after the data type in the method’s parameter list.
An ____ is the adjective that defines the type of access that outside classes will have to the attribute or method.
A(n) ____ is a method that establishes an object, reserving enough memory space for it and providing its name.
In some programming languages, such as C#, Visual Basic, and Java, every class you create is a child of one ultimate base class, often called the ____ class.
A(n) ____ constructor is one that requires no arguments.
A subclass constructor can pass ____ or parameters to its parent constructor.
The object-oriented techniques to manage errors such as dividing a value by 0 comprise the group of methods known as ____.
Methods are flexible partly because they are ____.
The memory location known as the ____ is where the computer stores the list of method locations to which the system must return.
When appropriate, specialized ____ classes provide an elegant way for you to handle error situations.
Coding
Question 1 What is the screen output of the following code segment? Explain the reasoning behind your answer.
Test1 = 70 Test2 = 98 Test3 = 84 NumberOfTests = 3 Average = (Test1 + Test2 + Test3) / NumberOfTests IF Average >= 90 THEN Output “Great job” Output “Your average is: ”, Average ELSE IF Average >= 80 or Average <=89 THEN Output “Nice work” Output “Your average is: “, Average ELSE Output “You will better next time!” ENDIF
Question 2 What screen output does the following code segment produce?
p = 2 q = 4 while p < q Output “Adios” r = 1 while r < q output “Adios” r = r + 1 endwhile p = p + 1 endwhile
Question 3 Design a program that allows a user to enter 10 numbers, then displays them in the reverse order of their entry. You must use an Array as your data structure.
Question 4 Design a class named CustomerRecord that holds a customer number, name, and address. Include methods to set the values for each data field and output the values for each data field. Create the class diagram and write the pseudocode that defines the class.
Question 5 Design an application in which you declare an array of five numbers and store five values in the array. Write a try block in which you loop to display each successive element of the array, increasing a subscript by one on each pass through the loop. Assume you are working with a language that automatically creates an ArrayIndexOutOfBoundsException when a subscript is not correct for an array. Create a catch block that catches the exception if it is generated and displays the message, “Now you’ve gone too far.”
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference
and should not be submitted as is. We are not held liable for any misuse of the solutions.
Please see the frequently asked questions page
for further questions and inquiries.
Kindly complete the form.
Please provide a valid email address and we will get back to you within 24 hours.
Payment is through PayPal, Buy me a Coffee
or Cryptocurrency.
We are a nonprofit organization however we need funds to keep this organization operating
and to be able to complete our research and development projects.