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
Maru [420]
3 years ago
13

Why would a programmer use a “public” variable for something like speed? Provide at least two other examples of variables a deve

loper would likely make “public.”
Computers and Technology
1 answer:
agasfer [191]3 years ago
7 0

It is useful for things that you don't need to redefine, and you may need to use to compute different things (such that you have different modules/functions to compute each one of these things).

<h3><u>What is a public variable?</u></h3>

A public variable is a variable that any function, sub procedure, or module can access without restriction.

Thus, if you want to define a variable only once and be able to call it from different functions or modules when you need it, you would want to make it a public variable.

An example with speed is:

You can make a simple code that for an initial speed computes the position vs time graph.

But you may want to expand that program, let's say that you make a module that also allows you to find the momentum or something like that (where you also need to use the speed).

Then defining the speed as public, is useful, as you can only call it with the module or function that you use to find the momentum.

Another example, maybe more complete.

Assume that you work with radiation physics. You define a mean energy of radiation (this would be the energy of the x-rays for example).

Now if you define that variable as public, you could use it for a lot of modules to compute a lot of different things, like fluency, kermas, etc.

Things that are really complex to compute and you may have the codes for each one in different modules/functions.

So it is really useful when you already had several codes that work with the same variable.

If you want to learn more about variables, you can read:

brainly.com/question/15683939

You might be interested in
Please help me please and thank you!
MaRussiya [10]

Answer:

1. a digital designer involves movement like animations, movies, etc. A graphic designer is static for an example logos pictures etc.

2. a ux is the interaction between humans and products

3.  a ui is the design of software and machines, for an example computers, electronic devices, etc.

4.  textures, color, value, and space

5. the basics are contrast, balance, emphasis, white space, hierarchy, movement, proportion, repetition, pattern, variety, unity, and rhythm

6. the basic fundamentals are images, color theory, lay-out, shapes, and typograph  

I hope this helped you and have a great rest of your day

7 0
3 years ago
A <br> is usually written in block style with the body text aligned along the left margin.
Fiesta28 [93]

Answer:

can you give the question and the rest of the answers? (if possible)

Explanation:

i dont really get it, are you answering a question or something?

7 0
3 years ago
Read 2 more answers
The Zoom slider will allow users to _____.
NeX [460]
The Zoom slider will allow users to change the way the document appears on the screen
3 0
3 years ago
Read 2 more answers
So I'm a teen computer programmer, and I've built a couple of projects, but I'm looking for an idea to make me big money. So fel
Juliette [100K]
I hate lag and glitch and so many adds
5 0
3 years ago
Why the shape of a cell is hexagonal
Nostrana [21]

Answer:

Hexagonal cell shape is perfect over square or triangular cell shapes in cellular architecture because it cover an entire area without overlapping i.e. they can cover the entire geographical region without any gaps.

I hope this helps

Pls mark as brainliest

8 0
3 years ago
Read 2 more answers
Other questions:
  • You created a database related to medicinal plants and their uses. For every plant, you would like to enter a description about
    11·1 answer
  • What will be a fundamental aspect of future games??
    12·2 answers
  • The purpose of an experiment is often based on ? A. new theories B. observations C. opinions of famous scientists D. beliefs of
    10·1 answer
  • Fiber deployment architectures include all of the following except:
    7·2 answers
  • Write a program that asks the user for the name of a text file. the program should display the last 10 lines of the file on the
    13·1 answer
  • 1. The acronym AUDIENCE serves to remind you of what to consider when analyzing an audience. The U for understanding. How does t
    15·1 answer
  • write a program in C# that reads a set of integers and then finds and prints the sum of the even and odd integers?​
    12·1 answer
  • What is the web page path on the web server for the URL:
    12·1 answer
  • What is the meaning of compiler​
    14·1 answer
  • What can a user modify on a business card using the Edit Business card in the dialog box?​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!