Question:
Programming Essentials?
Liz
2013-01-09 19:40:19 UTC
A(n) ____ statement indicates the end of the catch block in the pseudocode.
A) finalcatch
B) finally
C) endcatch
D) stop

When a data field is private, it is said to be ____ to any class other than the one in which it is defined.
A) uninheritable
B) implicit
C) unreachable
D) inaccessible

____ variables and constants are those that are known to an entire class.
A) Global
B) Local
C) Universal
D) Comprehensive

A ____ reference is an automatically created variable that holds the address of an object and passes it to an instance method whenever the method is called.
A) key
B) public
C) that
D) this

When appropriate, specialized ____ classes provide an elegant way for you to handle error situations.
A) Exception
B) Error
C) Constructor
D) Event


What is the screen output of the following code segment? Explain the reasoning behind your answer.

Test1 = 70
Test2 = 80
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 : “Your Average is:”, Average

Output “, You will do better next time!”

ENDIF


Class diagrams are a type of ____ diagram.
A) Unified Illustration Language
B) Unified Modeling Language
C) Object-Oriented Modeling Language
D) Unified Pseudocode Language


When a main() method needs to use another method, it calls, or invokes it.
A) True
B) False

What will be the output of the below program? List what will be outputed to the screen and explain your answer.

class Class_name

main()

// Declarations

num index

num SIZE = 10

num numbers[SIZE] = 0,0,0,0,0,0,0,0,0,0

index = 0

while index < SIZE

numbers[index]= index * 10

index = index + 1

endwhile

output “The Output is: ”

while index > 0

index = index – 1

output numbers[index]

endwhile

return

endClass


Programmers refer to hidden implementation details as existing in a ____.
A) white box
B) white hole
C) black box
D) black hole


The ability to use methods without knowing the details of their contents is a feature of ____.
A) abstraction
B) encapsulation
C) inheritance
D) construction


A(n) ____ is one instance of a class.
A) method
B) object
C) instantiation
D) attribute

A ____ is one that sends an exception object out of a method so it can be handled elsewhere.
A) catch statement
B) throw method
C) catch block
D) throw statement



____ is the process of creating a new, derived class from a base class.
A) Accessibility
B) Encapsulation
C) Inheritance
D) Polymorphism

A method is a program module that contains a series of statements that carry out a task.
A) True
B) False

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 code (not language specific, ie. psuedocode) that defines the class.

A child class contains all the data fields and ____ of its parent


Write a method that will perform the a division operation (divide by) on the numbers passed to it in two variables (numerator, denominator) and outputs the results. Use a try-catch pair to output an error message if the illegal operation of divide by 0 occurs.


An object is a category of things.
A) True
B) False
Three answers:
anonymous
2013-01-09 20:08:04 UTC
(Finally) statement indicates the end of the catch block in the pseudocode.



When a data field is private, it is said to be (inaccessible/uninheritable) to any class other than the one in which it is defined.



(Global) variables and constants are those that are known to an entire class.



A (this) reference is an automatically created variable that holds the address of an object and passes it to an instance method whenever the method is called.



When appropriate, specialized (exception) classes provide an elegant way for you to handle error situations.



Avegare will be 84.5 but since int so it will be 84.



Output “Nice work”

Output “Your average is: “, Average



Class diagrams are a type of (Unified Modeling Language) diagram.



When a main() method needs to use another method, it calls, or invokes it. : (True)



What will be the output of the below program? List what will be outputed to the screen and explain your answer.



0 0 0 0 0 0 0 0 0 0



Programmers refer to hidden implementation details as existing in a (black box).



The ability to use methods without knowing the details of their contents is a feature of (abstraction).



(Objcet) is one instance of a class.



A (throws method) is one that sends an exception object out of a method so it can be handled elsewhere.



(Inheritance) is the process of creating a new, derived class from a base class.



A method is a program module that contains a series of statements that carry out a task. (False it should be called as Function not Method because it is OOP name for Function in a class)



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 code (not language specific, ie. psuedocode) that defines the class.







A child class contains all the data fields and (inheritable/public scope) of its parent





Write a method that will perform the a division operation (divide by) on the numbers passed to it in two variables (numerator, denominator) and outputs the results. Use a try-catch pair to output an error message if the illegal operation of divide by 0 occurs.



int divide(int num, int denom)

{

double reuslt;

try{

return result=num/denom;

}

catch(ArithmaticException) {//print Divide by zero}



}





An object is a category of things. (False, it is "thing" (real world object) itself)
?
2016-02-24 02:39:01 UTC
Microsoft Security Essentials Comodo Antivirus Malwarebytes Avast Avira Of these antiviruses are the best to use and there all free of course you can install multiple antiviruses i have installed Norton 2010, and Malwarebytes, and Avast all together for Ultimate protection Norton 2010 is paid with my ISP but the others are free.
Billy
2015-10-14 12:08:51 UTC
yes


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...