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]
2 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]2 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
What technology gets its name from the notion that it ignores the traditional A, B, and C class designations for IP addresses?
goblinko [34]

Answer:

Classless Inter-Domain Routing

Explanation:

Classless Inter-Domain Routing (CIDR), pronounced “cider” or “sidder,” gets its name from the notion that it ignores the traditional A, B, and C class designations for IPv4 addresses and sets the network-host ID boundary wherever it wants to, in a way that simplifies routing across the resulting IP address spaces.

3 0
2 years ago
Computer ethis are crime done using computer technology (true )and(false)​
aliya0001 [1]

computer ethis are crime done using computer technology (true )and(false)

answer- true

8 0
2 years ago
Which laptop part is usually replaceable through unlocking it, pulling it out, and then replacing it with a new one?
leva [86]

Answer:

maccbook

Explanation:

maccbooks r awesome

7 0
2 years ago
Read 2 more answers
List 2 end to end test commands. <br><br> Will mark Brainliest!!
Delvig [45]

Answer:

ibm pll

Explanation:

4 0
2 years ago
Write a Java program named Problem 3 that prompts the user to enter two integers, a start value and end value ( you may assume t
Mashcka [7]

Answer:

hope this helps

Explanation:

import java.util.Scanner;

public class Problem3 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.print("Enter start value: ");

       int start = in.nextInt();

       System.out.print("Enter end value: ");

       int end = in.nextInt();

       if (start > end) {

           int temp = start;

           start = end;

           end = temp;

       }

       for (int i = start; i <= end; i++) {

           if (i % 2 == 1) {

               System.out.print(i);

               if (i == end || i + 1 == end) {

                   System.out.println();

               } else {

                   System.out.print(", ");

               }

           }

       }

   }

}

5 0
3 years ago
Other questions:
  • To arrange data in alphabetical order quickly, you can _____ the data.
    7·2 answers
  • List four useful spreadsheet functions and explain what they do.
    11·1 answer
  • Bayley wants to connect a new external hard drive to his Windows PC. He wants the fastest connection type available because he p
    9·2 answers
  • Attackers need a certain amount of information before launching their attack. One common place to find information is to go thro
    11·1 answer
  • 4. What are the ethical issues of using password cracker and recovery tools? Are there any limitations, policies, or regulations
    5·1 answer
  • Serena, an analyst at an environmental agency, wants to prepare a report using data from the Car Emissions database.
    11·2 answers
  • define the term computer hardware and its various types mentioning 5 examples of IP or devices with one diagram each​
    9·1 answer
  • What is cyber security ???​
    8·1 answer
  • A binary search algorithm ____________ an ordered list in<br> half to find an item.
    13·1 answer
  • Is windows CUI operating system??<br><br><br>What is the main purpose of folder ????<br><br><br>​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!