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
Marysya12 [62]
3 years ago
7

Explain how class (static) variables and methods differ from their instance counterparts. Give an example of a class that contai

ns at least one class variable and at least one class method. Explain why using a class variable and method rather than an instance variable and method would be the correct choice in the example you select.
Computers and Technology
1 answer:
irakobra [83]3 years ago
5 0

Answer:

Static variables and functions differs from their instance counterparts in that you don't need to instantiate an object of a class to access them (variables) or call them (functions). The class itself can be used to access or call static variables and functions.

Explanation:

Example:

Suppose we have a class that represents a word editor. To save progress, we need a file location on the disk.

We can define file location as a static variable, since all instances of the class will use the same file location value.

Also, to access the static variable outside of class definition, we can define a static method to get/set the value of the static variable.

A static save to file function can also be defined in the class (to perform the work to update the file on disk). Again this function would be defined as static, because all instances of the class will need the same method whenever they want to write to file.

You might be interested in
If you turn your volume to loud on u'r headphones can it break the sound quality of the speaker?
zzz [600]
Yes, it is possible to "blow the speaker" in your headphones by listening to loud music (such as high BPM stuff, like extratone or extremely bass-ey stuff)
7 0
3 years ago
Read 2 more answers
A banker would like to present a spreadsheet as part of a presentation to potential clients. The spreadsheet makes use of severa
Alekssandra [29.7K]

Answer:

subtotal function

Explanation:

The Microsoft Excel SUBTOTAL returns the subtotal of the numbers in the columns in a list or database, and it can be applied horizontally as well as vertically. And the SUBTOTAL function happens to be the built-in function in Excel which is categorized as the Math function or the Trigger function. And like a worksheet function, it can be inserted as a part of the formula inside a cell of a worksheet. Select the columns in a row, or rows in a column, and move to the Data tab in the ribbon. From there,  select the SUBTOTAL, and the function you would like to use, and press ok. And this means here the correct option is the subtotal function.

6 0
3 years ago
The shortest compressed format of the ipv6 address 2001:0db8:0000:1470:0000:0000:0000:0200 is
devlian [24]

The answer is : 2001:DB80:1470::200

A double colon ( :: ) can replace any single, contiguous string of one or more 16-bit segments (hextets) which is  consist of all 0s, and it can only be used once per IPv6 address. Therefore,any leading 0s (zeros) in any 16-bit section or hextet can be omitted.

3 0
4 years ago
A sum amounts to ₹2400 at 15% simple interest per annum after 4 years fond the sum.​
Elis [28]

Answer: $1,500

Explanation:

The future value of value using simple interest is:

Future value = Value * ( 1 + rate * time)

2,400 = Value * (1 + 15% * 4)

2,400 = Value * 1.6

Value = 2,400 / 1.6

Value = $1,500

6 0
3 years ago
What was one of the main purposes of the first computer systems?
wolverine [178]
<span>Financial transactions were one of the first purposes of computers. This is where "ticker tapes" came from; early computers were used to keep track of how stocks were performing. Computers in early days used large mainframe systems and punch cards to keep track of this type of data.</span>
6 0
4 years ago
Other questions:
  • The critical path of a network is the A. shortest time path through the network. B. path with the most activities. C. longest ti
    8·1 answer
  • Which best describes the benefits of renting a home?
    10·2 answers
  • . The toasting cycle of an automatic toaster is started by A. pushing the bread rack down. B. pushing the start button. C. turni
    14·2 answers
  • Stella is surfing the Internet to look for affordable apartments in New York City. Every time she clicks on a link to a webpage,
    9·1 answer
  • What expressions will initialize d with a random value such that all possible values for d are given by the inequality 1.5 ≤ d &
    8·1 answer
  • An administrator is helping a user connect a smartphone to a tablet via Bluetooth. What should the administrator do first?
    6·1 answer
  • What does t'challa actions reveal about his character( black panther movie)​
    6·1 answer
  • Write a program that produces an expense report for a trip to Lagos, Nigeria. Use the Internet to research the cost to travel to
    13·1 answer
  • Where to get industrial circuits far cry 6
    8·1 answer
  • What makes a recipe for a meal an example of an algorithm?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!