Ask Physics Expert

Question 1: Method calls in a program are added to the data structure called the __________, handling calls in a last in, first out manner.

A. stack
B. LIFO manager
C. heap
D. overloader

Question 2: Random-number generator scaling is the process of:

A. causing each number in a range to have equal likelihood of being generated.
B. modifying the range from which a number will be generated.
C. calculating a sequence of numbers to be generated.
D. None of the above

Question 3: A method is invoked by a:

A. return statement.
B. method header.
C. method call.
D. None of the above

Question 4: To call a static method, use the __________ name followed by a period, and the method with its arguments.

A. class's
B. instance variable's
C. namespace's
D. All of the above

Question 5: When overloading methods, the compiler distinguishes the methods by their __________, a combination of the method's name, parameters, and order of those parameters.

A. designation
B. signature
C. passback
D. stack

Question 6: The parameter list in the method header and the arguments in the method call must agree in:

A. number.
B. type.
C. order.
D. All of the above

Question 7: If you want a method to have the ability to change a parameter value to the calling function, you precede the variable in the method call with a __________ keyword.

A. ref
B. out
C. enum
D. return

Question 8: Which of the following correctly calls the Math class method Sqrt with a value of 36?

A. Sqrt(36);
B. Math.Sqrt(36);
C. Math.Sqrt = 36;
D. None of the above

Question 9: Which keyword can you use to immediately give control back to a method's caller?

A. Continue
B. Break
C. Return
D. Next

Question 10: A constant value is declared using the __________ keyword.

A. ref
B. out
C. enum
D. const

Question 11: How are various parameters separated in the method header?

A. Brackets
B. Braces
C. Commas
D. Periods

Question 11: How are various parameters separated in the method header?

A. Brackets
B. Braces
C. Commas
D. Periods

Question 12: A(n) __________ method is a method that does not depend on the contents of an object, and therefore can be called independently, such as methods within the Math class.

A. overloaded
B. user-defined
C. static
D. public

Question 13: A static method can:

A. call only other static methods of the same class directly.
B. manipulate only static fields in the same class directly.
C. be called using the class name and a dot (.).
D. All of the above

Question 14: A programmer can __________ a program by creating user-defined methods, which are reusable methods available to be called from several locations in a program.

A. program
B. define
C. compartmentalize
D. modularize

Question 15: In object-oriented programming, methods __________ have the same name, but with a different set of parameters. This is called method __________.

A. can; overloading
B. cannot; overloading
C. can; enumeration
D. cannot; enumeration

Question 16: A method can accept several parameters. Each value passed to the method is separated by a:

A. comma (,).
B. plus (+).
C. colon (:).
D. spacer ( ).

Question 17: The __________ keyword allows the programmer to declare a set of constant values represented by identifiers.

A. ref
B. out
C. enum
D. return

Question 18: Which of the following describes a static variable?

A. A variable with one copy shared by all class objects
B. A variable whose value may not be changed
C. All of the above
D. None of the above

Question 19: By definition, the __________ of a declared object is the portion of the application that can refer to the declared entity by an unqualified name.

A. use
B. return
C. enum
D. scope

Question 20: When overloading methods, the __________ of the method is ignored by the compiler, which will result in an error if the method names and parameter list are the same.

A. name
B. return type
C. parameter order
D. parameter data types

Physics, Academics

  • Category:- Physics
  • Reference No.:- M91802426
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Physics

Question oppositely charged parallel plates are separated

Question: Oppositely charged parallel plates are separated by 5.31 mm. A potential difference of 600 V exists between the plates. (a) What is the magnitude of the electric field between the plates? N/C (b) What is the ma ...

Question an object of mass m attached to a spring of force

Question: An object of mass m attached to a spring of force constant k oscillates with simple harmonic motion. The maximum displacement from equilibrium is A and the total mechanical energy of the system is E. What is th ...

Quesion when a nucleus of 235u undergoes fission it breaks

Quesion: When a nucleus of 235U undergoes fission, it breaks into two smaller, more tightly bound fragments. Part A: Calculate the binding energy per nucleon for 235U. Express your answer with the appropriate units. E=__ ...

Question a nylon rope used by mountaineers elongates 130 m

Question: A nylon rope used by mountaineers elongates 1.30 m under the weight of a 65.0-kg climber. If the rope is 45.0 m in length and 7.0 mm in diameter, what is Young's modulus for this material? The response must be ...

Question an object is 30 cm in front of a converging lens

Question: An object is 30 cm in front of a converging lens with a focal length of 10 cm. Use ray tracing to determine the location of the image. What are the image characteristics: (i) upright or inverted, (ii) magnifica ...

Question an object of mass m is traveling on a horizontal

Question: An object of mass m is traveling on a horizontal surface. There is a coefficient of kinetic friction µ between the object and the surface. The object has speed v when it reaches x=0 and encounters a spring. Th ...

Question in one of the classic nuclear physics experiments

Question: In one of the classic nuclear physics experiments at the beginning of the 20th century, an alpha particle was accelerated towards a gold nucleus and its path was substantially deflected by the Coulomb interacti ...

Question an object of mass m is dropped from height h above

Question: An object of mass m is dropped from height h above a planet of mass M and radius R. Find an expression for the object's speed as it hits the ground. Express your answer in terms of the variables m,M,h,R and app ...

Question one type of bb gun uses a spring-driven plunger to

Question: One type of BB gun uses a spring-driven plunger to blow the BB from its barrel. (a) Calculate the force constant of its plunger's spring if you must compress it 0.130 m to drive the 0.0580-kg plunger to a top s ...

Question an object is placed 30 cm to the left of a

Question: An object is placed 30 cm to the left of a converging lens that has a focal length of 15cm. Describe what the resulting image look like (i.e. image distance, magnification, upright or inverted images, real or v ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As