loader  Loading... Please wait...

Question(s) / Instruction(s):


Short Answer (25 questions, 2 points each, 50 points total)

1. What is an advantage of using an integrated development environment?

2. What operator has the lowest precedence?

3. In pseudocode, a(n) ____ statement is used to clearly show where the selection structure ends.

4. A structure that includes separate actions when an expression is true and when it is false is called a(n) ____ structure.

5. In a flowchart or in pseudocode, you can use the symbol that mathematicians use to mean “not equal,” ____.

6. Programmers must be careful to use the correct ____ in the statement that controls a loop.

7. Programmers use the term “____” to describe programs that are well designed and easy to understand and maintain.

8. 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.

9. Every array has a(n) ____ size.

10. Users enter incorrect data frequently; a good program should be able to handle the mistake and not allow the ____ to be out of bounds.

11. Modularization provides ____.

12. Programmers say that variables and constants declared within a method are ____ only after declaration within that method.

13. ____ variables and constants are those that are known to an entire class.

14. Programmers refer to hidden implementation details as existing in a ____.

15. A method’s name and parameter list constitute the method’s ____.

16. You can indicate that a method parameter must be an array by placing ____ after the data type in the method’s parameter list.

17. An ____ is the adjective that defines the type of access that outside classes will have to the attribute or method.

18. A(n) ____ is a method that establishes an object, reserving enough memory space for it and providing its name.

19. 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.

20. A(n) ____ constructor is one that requires no arguments.

21. A subclass constructor can pass ____ or parameters to its parent constructor.

22. The object-oriented techniques to manage errors such as dividing a value by 0 comprise the group of methods known as ____.

23. Methods are flexible partly because they are ____.

24. The memory location known as the ____ is where the computer stores the list of method locations to which the system must return.

25. When appropriate, specialized ____ classes provide an elegant way for you to handle error situations.

Coding (5 questions, 10 points each, 50 points total)

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


IF Average >= 80 or Average <=89 THEN

Output “Nice work”

Output “Your average is: “, Average


Output “You will better next time!”


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


p = p + 1


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.”

Find Similar Answers by Subject

Student Reviews

Rate and review your solution! (Please rate on a Scale of 1 - 5. Top Rating is 5.)

Expert's Answer
Download Solution:

This solution includes:

  • Plain text
  • Cited sources when necessary
  • Attached file(s)
  • Solution Document(s)

Reach Us