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
hoa [83]
3 years ago
10

Tuesday

Computers and Technology
1 answer:
4vir4ik [10]3 years ago
7 0

Answer:

?

Explanation:

these are instructions to a question?

You might be interested in
Write a RainFall class that stores the total rainfall for each of 12 months into an array of doubles. The program should have me
RSB [31]

Answer:

Explanation:

The code provided worked for the most part, it had some gramatical errors in when printing out the information as well as repeated values. I fixed and reorganized the printed information so that it is well formatted. The only thing that was missing from the code was the input validation to make sure that no negative values were passed. I added this within the getMonths() method so that it repeats the question until the user inputs a valid value. The program was tested and the output can be seen in the attached image below.

import java.io.*;

import java.util.*;

class Rainfall

{

   Scanner in = new Scanner(System.in);

   private int month = 12;

   private double total = 0;

   private double average;

   private double standard_deviation;

   private double largest;

   private double smallest;

   private double months[];

   public Rainfall()

   {

       months = new double[12];

   }

   public void setMonths()

   {

       for(int n=1; n <= month; n++)

       {

           int answer = 0;

           while (true) {

               System.out.println("Enter the rainfall (in inches) for month #" + n + ":" );

               answer = in.nextInt();

               if (answer > 0) {

                   months[n-1] = answer;

                   break;

               }

           }

       }

   }

   public void getTotal()

   {

       total = 0;

       for(int i = 0; i < 12; i++)

       {

           total = total + months[i];

       }

       System.out.println("The total rainfall for the year is " + total);

   }

   public void getAverage()

   {

       average = total/12;

       System.out.println("The average monthly rainfall is " + average);

   }

   public void getLargest()

   {

       double largest = 0;

       int largeind = 0;

       for(int i = 0; i < 12; i++)

       {

           if (months[i] > largest)

           {

               largest = months[i];

               largeind = i;

           }

       }

       System.out.println("The largest amount of rainfall was " + largest +

               " inches in month " + (largeind + 1));

   }

   public void getSmallest()

   {

       double smallest = Double.MAX_VALUE;

       int smallind = 0;

       for(int n = 0; n < month; n++)

       {

           if (months[n] < smallest)

           {

               smallest = months[n];

               smallind = n;

           }

       }

       System.out.println("The smallest amount of rainfall was " + smallest +

               " inches in month " + (smallind + 1));

   }

   public static void main(String[] args)

   {

       Rainfall r = new Rainfall();

       r.setMonths();

       r.getTotal();

       r.getSmallest();

       r.getLargest();

       r.getAverage();

   }

}

8 0
3 years ago
List the 4 Fundamental Storage Technologies​
grigory [225]

Answer:

Magnetic Storage. Magnetic storage encodes data in patterns of positive and negative magnetic polarity on some magnetic medium like organic metal. ...

Optical Storage. Optical storage technology use laser/optical reflection phenomenon to read or write data. ...

Solid State storage.

Explanation:

Hope this help!!

8 0
3 years ago
Read 2 more answers
(--BRAINLIEST--)<br>Explain the types of secondary memory on the basis of data access.​
Nina [5.8K]

There are two types of secondary memories.

  1. RAM
  2. ROM

RAM:

  • RAM stands for random access memory .
  • It is expandable.
  • we can do multiple things in it.
  • Its erasable.

ROM

  • ROM stands for read only memory.
  • It is permanent .
  • We can only read in it.
  • Its permanent hence not removable.
8 0
3 years ago
Read 2 more answers
Use the paragraph underneath to answer the four questions.
Xelga [282]
Wow...that’s a long paragraph
8 0
3 years ago
Your teacher needs to keep track of a biology experiment's results for all students, to help calculate the grades. Which applica
IRISSAK [1]

Answer:

I think notepad is best suited for this task...

3 0
3 years ago
Read 2 more answers
Other questions:
  • Problem Overview You have just moved into a new home, and you have brought all your digital communications devices. After contac
    10·1 answer
  • Why do most people share, especially photos online using social media?
    11·2 answers
  • Which of the following is an example of a wanted versus I need
    5·1 answer
  • Type the correct answer in the box. Spell all words correctly. Joseph is a digital media developer and has years of work experie
    15·1 answer
  • Which of the following is considered proper typing technique?
    15·1 answer
  • Which game would be classified as an advergame? A. Tomb Raider B. Fifa Soccer C. Prince of Persia D. Flower
    9·1 answer
  • A form letter can be customized by using different fields in a __________.
    15·2 answers
  • When you run your Windows Form application, what is the lifespan of a global variable (also known as a "field" or "class" variab
    13·1 answer
  • PLS HELP subject (Microsoft Excel ) True or False:
    9·1 answer
  • 4. Return the card number, first name, last name, and average late fee of each customer. Name this column as "Fee".
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!