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
Ipatiy [6.2K]
3 years ago
5

Design a GUI program to find the weighted average of four test scores. The four test scores and their respective weights are giv

en in the following format: testscore1 weight1 ... For example, the sample data is as follows: 75 0.20 95 0.35 85 0.15 65 0.30 The user is supposed to enter the data and press a Calculate button. The program must display the weighted average.
Computers and Technology
1 answer:
Alexus [3.1K]3 years ago
3 0

<u>Answer:</u>

I am writing <em>partial code in</em> <em>c++ to calculate weighted average</em>. The weighted average should be calculated based on multiplying the test score and its <em>respective weight and finally add all the test score.</em>

<u>Explanation:</u>

<em>int arrtestscore[100];</em>

<em>int arrweight[100];</em>

<em>int n;</em>

<em>double weightedavg;</em>

<em>cout<<”Enter the number of test score for which weighted average needs to be calculated”;</em>

<em>cin>>n;</em>

<em>for(int x = 0; x <n;x++)</em>

<em>{</em>

<em> cout<<”Enter test score :” + (x+1) ;</em>

<em> cin>>arrtestscore[x];</em>

<em> count<<”Enter the respective weight:”;</em>

<em> cin>>arrweight[x];</em>

<em>}</em>

<em>for (int i=0; i<n;i++)</em>

<em>{</em>

<em> weightedavg = weightedavg + (arrtestscore[i] * arrweight[i])</em>

<em>}</em>

<em>cout<<”weighted average = “ <<weightedavg; </em>

You might be interested in
In a typical e-mail address, the "host" is user: which one of the following word processing features saves you the most time whe
gayaneshka [121]
Find-and-replace . hope this helps !
4 0
3 years ago
A sinewave has a period (duration of one cycle) of 645 μs. What is the corresponding frequency of this sinewave, in kHz, express
irga5000 [103]

The corresponding frequency of this sinewave, in kHz, expressed to 3 significant figures is: <em>155 kHz.</em>

<u>Given the following data:</u>

  • Period = 645 μs

Note: μs represents microseconds.

<u>Conversion:</u>

1 μs = 1 × 10^{-6} seconds

645 μs = 645 × 10^{-6} seconds

To find corresponding frequency of this sinewave, in kHz;

Mathematically, the frequency of a waveform is calculated by using the formula;

Frequency = \frac{1}{Period}

Substituting the value into the formula, we have;

Frequency = \frac{1}{645\; * \;10^{-6}}

Frequency = 1550.39 Hz

Next, we would convert the value of frequency in hertz (Hz) to Kilohertz (kHz);

<u>Conversion:</u>

1 hertz = 0.001 kilohertz

1550.3876 hertz = X kilohertz

Cross-multiplying, we have;

X = 0.001 × 1550.39

X = 155039 kHz

To 3 significant figures;

<em>Frequency = 155 kHz</em>

Find more information: brainly.com/question/23460034

5 0
3 years ago
The ____ command can be used to view the contents of a record when it is anticipated that the record will need to be modified. I
GREYUIT [131]

Answer:

The correct answer is B)

Explanation:

The commit command allows us to:

• Consolidate, confirm

• committing refers to the idea of confirming a set of provisional changes permanently.

• A popular use is at the end of a database transaction.

•

The LOCK TABLE command should be used:

• when a lock of the mode specified in the table can be acquired.

• The command will wait for everything you need to get the lock,

• In case you cannot acquire the lock immediately, the NOWAIT option is specified so that the command cancels the transaction.

6 0
3 years ago
FOR PYTHON 3
VLD [36.1K]

Answer:

Complete Python code with step by step comments for explanation are given below.

Python Code:

# creating a function named scrabble_number that will take num as input argument

def scrabble_number(num):

   # print the original number  

   print("The original number is: ",num)  

   # we can implement the required logic by using python built-in functions join() and zip()  

   scrambled = ''.join([char[1]+char[0] for char in zip(num[::2], num[1::2])])  

   # print the scrambled number

   print("The scrambled number is: " + str(scrambled))  

Driver code:

scrabble_number('123456')

Output:

The original number is: 123456

The scrambled number is: 214365

5 0
3 years ago
I have a problem with Instagram.
krok68 [10]

Answer:

developer tool

Explanation:

if you're using chrome click on the 3 dots that's in the top right corner and go to tools, you will see "developer tools" and click on that, then you will see an icon that shows a laptop/computer and an iphone click on that and you can even choose the type of phone you wish to see the view of (ex. iphone X), refresh the page and you will be able to see the direct message icon and you will be able to message your friend.

good luck.

5 0
3 years ago
Other questions:
  • Clifford created a table using OpenOffice Writer and entered some information into the table. Later, he needed to add more rows
    15·2 answers
  • What is the first step to creating a PivotTable?
    9·2 answers
  • There are 10 red apples and 12 green apples in a basket. If Vinta randomly selects 3 apples from the basket, what is the probabi
    15·1 answer
  • Consider a class called Rocket that has a private instance variable called Engine. You are writing a "getter" for the Engine. Us
    7·1 answer
  • Sequence encryption is a series of encryptions and decryptions between a number of systems, wherein each system in a network dec
    9·1 answer
  • True/False - According to CP-14 Sale of Modular Homes, a licensee who sells land and a modular home to be affixed to the land, t
    11·1 answer
  • Narrate an incident from the experience of a 14 year old girl which brings out the message: " Never leave till tomorrow what you
    10·1 answer
  • Https://www.blooket.com/play?id=300932<br> please
    8·2 answers
  • What is humanity’s greatest invention?
    13·1 answer
  • How do you get a blank business card template in word?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!