1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
charle [14.2K]
3 years ago
12

Ben wants to create a Book class that has an instance variable serialNumber. Where should he declare the instance variable

Computers and Technology
1 answer:
MrMuchimi3 years ago
4 0

Answer:

within the Book class but needs to also be outside of any methods.

Explanation:

If Ben is creating an entire Book class then the instance variable needs to be within the Book class but needs to also be outside of any methods. If Ben places the variable inside a method it can only be used by that method and therefore becomes an instance variable of that method and not the class. By creating it inside the class and outside the methods it can be used every single time a Book object is created. Therefore, creating an instance variable of serialNumber every time.

You might be interested in
Universal Containers wants line items to be organized into pre-defined groups on the output document. The name of these pre-defi
Vsevolod [243]

Answer:

C. Set the Group Filed field on the Quote Template or Template Section records.

D. Set the New Quote Group field on each Product record with the associated group name.

Explanation:

There are two ways through administrator can organized into pre-defined groups on the output document and name of these pre-defined groups needs to be displayed above each group in the output to identify it.

Both of the ways are given in option "C" and "D".

1. We set the group field on the quote template to organize the groups in pre-defined order on the output.

2. We also set the New Quote Group field on each Product record with the associated group name to display the name on each group in the output to identify it.

6 0
4 years ago
Programs which were typically reserved for college-level classes such as computer animation and CAD programs are now being appli
Irina-Kira [14]
Answer: I think C


Step by step explanation:
8 0
3 years ago
Computer simulations can: A. accurately predict the weather a month in advance.
loris [4]
I believe the answer is A but i am not too sure :/
7 0
4 years ago
Which of the following commands would instruct OSPF to advertise ONLY the 192.168.10.0/24 network in Area 0?
xz_007 [3.2K]

Answer:

First, you need to start the OSPF process by executing the command:

<em>Router (config)# router ospf {process-ID#}</em>

Then, you have to instruct the router to advertise the networks that are directly linked to it by entering this network command with the area ID number for that network:

Router (config-router)# network {192.168.10.0} {255.255.255.0} area {0}

8 0
4 years ago
Which of the following methods is a static method? The class in which the method is defined is given in parentheses following th
maw [93]

Answer:

C. sqrt(Math)

Explanation:

All but one of options A to E are is not a static method.

Only option C is a static method. The sqrt() is a static method of Math, that can always be used as Math.sqrt() is used;

The Math class defines all of its methods to be static. Invoking Math methods is done by using Math as a method rather than a variable of type Math; this means that sqrt(Math) doesn't rely on instance variables and don't need to be overridden, unlike others.

Lastly, sqrt(Math) is a static method because unlike other options, it is an utility method, and it is relevant to computations on primitive data types.

The purpose of the static method is in large part to offer a standard library of functions, and it doesn't need to be applied directly to an object.

4 0
3 years ago
Other questions:
  • The number of protons plus the number of nuetrons equal the <br> A.atomic weight<br> B.atomic number
    10·1 answer
  • What is a programming language?
    11·2 answers
  • There is an enormous amount of information on the Internet that is automatically separated into good content and not-so-good con
    15·1 answer
  • The distance between Jupiter and the Sun is 5.2 AU. What is the distance in millions of kilometers? (One AU is about 150 million
    8·2 answers
  • (Game Design) Creating and manipulating data structures is one of the primary functions of a development environment.
    12·2 answers
  • In many multiprocessor systems __________ is used rather than dedicated processor assignment; in order to evenly distribute work
    14·1 answer
  • Keli is unable to find a shape that meets her needs. Which feature in Power Point should she use to create shapes that are compl
    6·1 answer
  • Write a method that computes the average of the values in an array of doubles. The header of the method is as follows:
    14·1 answer
  • When a derived class method has the same name as a base class method, it is often said that the derived class method ________ th
    13·1 answer
  • Im a beginner programmer. what languages should i learn and how do i get better
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!