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
Helen [10]
4 years ago
10

Array testGrades contains NUM_VALS test scores. Write a for loop that sets sumExtra to the total extra credit received. Full cre

dit is 100, so anything over 100 is extra credit. Ex: If testGrades = {101, 83, 107, 90}, then sumExtra = 8, because 1 + 0 + 7 + 0 is 8.
import java.util.Scanner;
public class SumOfExcess {
public static void main (String [] args) {
final int NUM_VALS = 4;
int[] testGrades = new int[NUM_VALS];
int i = 0;
int sumExtra = -9999; // Assign sumExtra with 0 before your for loop
testGrades[0] = 101;
testGrades[1] = 83;
testGrades[2] = 107;
testGrades[3] = 90;
/* Your solution goes here */
System.out.println("sumExtra: " + sumExtra);
return;
}
}
Computers and Technology
1 answer:
nirvana33 [79]4 years ago
7 0

Answer:

sumExtra=0;

       for(i=0;i<NUM_VALS;i++)    // NUM_VALS is 4 declared above already

       {

           if(testGrades[i]>100)     //to check if there is extra credit or not

           {

               sumExtra+=(testGrades[i]-100);     //only extra credit will added

           }

       }

Explanation:

Above is the code segment that needs to be put in  the blank.

You might be interested in
An example of a host-based intrusion detection tool is the tripwire program. This is a file integrity checking tool that scans f
klio [65]

Answer:

The main problem with such a tool would be resource usage

Explanation:

The main problem with such a tool would be resource usage. Such a tool would need a large amount of CPU power in order to check all of the files on the system thoroughly and at a fast enough speed to finish the process before the next cycle starts. Such a program would also have to allocate a large amount of hard drive space since it would need to temporarily save the original versions of these files in order to compare the current file to the original version and determine whether it changed or not. Depending the amount of files in the system the work on configuring the program may be very extensive since each individual file needs to be analyzed to determine whether or not they need to be verified by the program or not. Monitoring responses may not be so time consuming since the program should only warn about changes that have occurred which may be only 10% of the files on a daily basis or less.

8 0
3 years ago
For which three everyday activities do people most typically use computers?
olchik [2.2K]

Answer:

Explanation:

People use computers to :

1. Communicate

2. Research

3. To better understand different aspects of their domain or just something they want to know.

4. Computers have the power to be obedient and do whatever people want, which makes them very efficient for a lot of tasks.

5. The fact that computers can run complex algorithms at an incredible speed is something that would be impossible for a person.

6. Computers can make people better understand the world.

7. An interesting fact, is that the brain works on electricity just like a computer, but also works like a computer. (imagine the neurons of the brain being bits.)

8. With the help of computers, we discovered more than 60 trillion of Pi's digits.

9. AI is a very powerful concept for computers because they can learn about anything over time, and get better than people at doing real-life tasks, which would make the overall human civilization better.

10. Computers could help us mathematically find Earth-like planets, which will be useful since in billions of years the sun will die.

11. The human robots, which would get one of the best human-made inventions, could simply change the world, into a way more efficient one, and the fact that our brain works just like the computer, makes us more like robots.

But, what if robots take over the world and kill all humans? Is that possible?

Nope. A robot will never kill anyone. Know why? Because robots will always be obedient to the code we write into them. Whatever if write into their chip, they will run(the code) that.

If a robot is coded to not kill anyone and kills someone, it is just like we wouldn't live in real life. No robot can overthink the code we put into them. People just think that robots will overtake control because of films and stories. That will never happen.

That's just how robots work. Humans are robots. But we can do whatever we want because the DNA doesn't program us to not do something. As humans, we can do whatever we think because we are programmed to not have limits in thinking. But, the robots have a limit. That limit is the script written into it.

Computers and AI have just advantages. No one will kill someone.

4 0
2 years ago
A data table is a range that displays what?
shutvik [7]

Answer:

D. The results of changing certain values in one or more formulas

Explanation:

On edge

8 0
3 years ago
Read 2 more answers
I am having horrible trouble with deciding if I should get Audacity or Adobe Spark for recording, if someone could help me choos
lbvjy [14]

I haven't really used either, but people I know would prefer using Audacity.

5 0
3 years ago
Read 2 more answers
The pseudo-class selectors for links let you use CSS to change the formatting for all but one of the following. Which one is it?
aev [14]
B. A link that is inactive
7 0
3 years ago
Other questions:
  • A user has a PC with RAID configuration and reports slow computer performance. A technician uses the manufacture’s diagnostic so
    12·1 answer
  • To create a formula in ____, you would first click in one of the cells.
    15·2 answers
  • To create a default value for a parameter in the parameter list of a function, you code a/an ________________ sign after the par
    5·1 answer
  • Add the function min as an abstract function to the class arrayListType to return the smallest element of the list. Also, write
    15·1 answer
  • Which is the highest level of the hierarchy of needs model?
    7·2 answers
  • a conpany manufacturers computer screens that utilize less electricity. which form of technology would this be classified as​
    5·1 answer
  • Read the Security Guide about From Anthem to Anathema on pages 238-239 of the textbook. Then answer the following questions in t
    14·1 answer
  • Tools used to type text on Ms -paint​
    10·1 answer
  • Why does the use of passwords put the overall security of the network in jeopardy?
    15·1 answer
  • are there any hexadecimal digits that cannot be created using 4 bits? how many bits would you need to represent the hexadecimal
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!