Homework

Homework Questions? Ask a Tutor for Answers ASAP

Ask an Expert,
Get an Answer ASAP!

Homework

The problem Write a RainFall class that stores the total…

Customer Question
The problem Write a RainFall class...
The problem
Write a RainFall class that stores the total rainfall for each of 12 months into an array of doubles. The program should have methods that return the following:the total rainfall for the year
the average monthly rainfall
the month with the most rain
the month with the least rain
Demonstrate the class in a complete program.
Input Validation: Do not accept negative numbers for monthly rainfall figures.I have the pure class for this problem and want to come out an application class which uses Scanner class to ask users to fill in their monthly rainfall. Make the application class short and easy.Here is the pure class, according to this, please help me to get an application class
/**
The Rainfall class stores data about a rainfall
for the Rainfall Class programming challenge.
*/public class Rainfall
{
private double[] rain; // Array to hold rainfall data
/**
Constructor
@param r An array of rainfall figures.
*/
public Rainfall(double r[])
{
// Create a new array.
rain = new double[r.length];
// Copy the argument's elements to the
// new array.
for (int i = 0; i < r.length; i++)
rain[i] = r[i];
}
/**
The getTotalRainFall method calculates the total
rainfall.
@return The total amount of rainfall.
*/
public double getTotalRainFall()
{
double total = 0.0; // Accumulator
// Accumulate the sum of the rain array elements.
for (int i = 0; i < rain.length; i++)
total += rain[i];// Return the sum.
return total;
}
/**
The getAverageRainfall method calculates the
average amount of rainfall.
@return The average amount of rainfall.
*/
public double getAverageRainFall()
{
return getTotalRainFall() / rain.length;
}/**
The getHighestMonth method determines the month
with the highest amount of rainfall.
@return The number of the month with the highest
amount of rainfall.
*/
public int getHighestMonth()
{
int highest = 0;
// Find the element with the highest value.
for (int i = 1; i < rain.length; i++)
{
if (rain[i] > rain[highest])
highest = i;
}
// Return the element number.
return highest;
}/**
The getLowstMonth method determines the month
with the lowest amount of rainfall.
@return The number of the month with the lowest
amount of rainfall.
*/
public int getLowestMonth()
{
int lowest = 0;
// Find the element with the lowest value.
for (int i = 1; i < rain.length; i++)
{
if (rain[i] < rain[lowest])
lowest = i;
}
// Return the element number.
return lowest;
}/**
The getRainAt method returns a specified value
in the array.
@param e The element number to return.
@return The value stored in the specified element.
*/
public double getRainAt(int e)
{
return rain[e];
}
}
Submitted: 2 months ago.Category: Homework
Show More
Show Less
Ask Your Own Homework Question
Answered in 2 hours by:
12/12/2017
Tutor: LogicPro, Engineer replied 2 months ago
LogicPro
LogicPro, Engineer
Category: Homework
Satisfied Customers: 13,326
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML
Verified

Hi

Ask Your Own Homework Question
Tutor: LogicPro, Engineer replied 2 months ago

Welcome

Download answer from here: http://wikisend.com/download/773628/RainFallClass.zip

Let me know if you need anything else or Leave your rating by selecting five stars located on the top right of the question page. Giving a positive rating compensates the Expert for their time with you. Please remember that your Expert will not be paid until you leave a positive rating for the answer. If the stars are grayed out or you cannot click on the stars to rate your experience, reply to your Expert and let them know so they can adjust your question and allow you to rate.

Please consider adding bonus after rating

http://ww2.justanswer.com/help/what-if-expert-does-really-fantastic-job-hl

You can also come back and add a bonus at a later date by using the "Write a review or give a bonus" button on your question page.

We can continue the conversation until you're satisfied and rate my answer as excellent to credit me. I can address follow up questions and I'm always here to help.

You can ask me again using "For LogicPro only" at the start of your questions like other customers to get instant answers. It will ensure that question is for me.

Please bookmark my profile page:

http://www.justanswer.com/homework/expert-logicpro/

so you can come back and ask me a question anytime.

Thank you for using this site!

LogicPro

Ask Your Own Homework Question
Tutor: LogicPro, Engineer replied 2 months ago
This answer is protected
Would you like to ask this question?
If you've already paid for this answer, simply Login.
Ask LogicPro Your Own Question
LogicPro
LogicPro
LogicPro, Engineer
Category: Homework
Satisfied Customers: 13,326
13,326 Satisfied Customers
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML

LogicPro is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here.

DianeDallas, TX

< Previous | Next >

Meet the Experts:

LogicPro

LogicPro

Engineer

13,326 satisfied customers

Expert in Java C++ C C# VB Javascript Design SQL HTML

Manal Elkhoshkhany

Manal Elkhoshkhany

Tutor

4,551 satisfied customers

More than 5000 online tutoring sessions.

Linda_us

Linda_us

Finance, Accounts & Homework Tutor

3,138 satisfied customers

Post Graduate Diploma in Management (MBA)

Chris M.

Chris M.

M.S.W. Social Work

2,636 satisfied customers

Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)

F. Naz

F. Naz

Chartered Accountant

2,161 satisfied customers

Experience with chartered accountancy

Bizhelp

Bizhelp

CPA

1,887 satisfied customers

Bachelors Degree and CPA with Accounting work experience

Seanna

Seanna

Tutor

1,781 satisfied customers

3,000+ satisfied customers, all topics, A+ work

< Previous | Next >

Related Homework Questions
I am working on a homework assignment and need answers about
I am working on a homework assignment and need answers about changing articles and adjectives … read more
Cher
Cher
JustAnswer Expert & Mentor;Teacher/Tutor
Masters Degree
1,382 satisfied customers
Subtraction Game, Name the file subtraction_game.py.
Subtraction Game, Name the file subtraction_game.py. ***Modify the below example so it meets the following requirements:**The new program shall present random subtraction questions to the player until… read more
LogicPro
LogicPro
Engineer
13,326 satisfied customers
Need help with the following two python based programs: 1) I
Need help with the following two python based programs:1) I need a program that reads four integer values corresponding to an IP address "a1.a2.a3.a4" (IPv4), and determines whether the values form a … read more
Ingo U
Ingo U
Master\u0027s Degree
357 satisfied customers
Turtle ASCII Table. Name file turtle_ascii.py Using Turtle
Turtle ASCII Table. Name file turtle_ascii.pyUsing Turtle graphics:(Display the ASCII character table) Write a program that displays the characters in the ASCII character table from ! to ~. Display te… read more
Ingo U
Ingo U
Master\u0027s Degree
357 satisfied customers
12. If the appellate court requires that issues be presented
12. If the appellate court requires that issues be presented in the form of questions, how should the questions be phrased? A. As briefly and broadly as possible, leaving details for the discussion in… read more
Cher
Cher
JustAnswer Expert & Mentor;Teacher/Tutor
Masters Degree
1,382 satisfied customers
Network Administration (All essay answers need to be
Network Administration (All essay answers need to be double-spaced)1. Create a table the shows six of the common TCP/IP protocols installed on Windows Server 2012/R2. Protocol Name OSI Layer Function2… read more
David L.
David L.
Bachelor\u0027s Degree
6 satisfied customers
Writing/listening comprehension (50point), directions, you
Writing/listening comprehension (50point) , directions, you will hear a story in Spanish. In English, summarize the story in a composition of between ten and twenty sentences, the story is on 4L side … read more
Cher
Cher
JustAnswer Expert & Mentor;Teacher/Tutor
Masters Degree
1,382 satisfied customers
Research Paper Conduct a SWOT analysis and a financial
Research PaperConduct a SWOT analysis and a financial analysis for a telecommunication organization of your choice. Write a 5-8 page long paper and submit it to the Assignments Dropbox by the end of W… read more
GLENN
GLENN
Master of Mathematics
359 satisfied customers
Well I have a Project I need help with, I am new here but
well I have a Project I need help with, I am new here but really struggling with this one … read more
LogicPro
LogicPro
Engineer
13,326 satisfied customers
Describe the main functions of a retail bank. Inputs,
how the information identified is captured by the bank, processed and disseminated… read more
judybailey61
judybailey61
Bachelors degree
196 satisfied customers
Looking to have another program written. i will attached the
Looking to have another program written. i will attached the material. IT is in the perl language and due by this sunday at 3 pm/ Thanks… read more
LogicPro
LogicPro
Engineer
13,326 satisfied customers
1. Which of the following sentences would be the best to
1. Which of the following sentences would be the best to include in a memo to the court? A. "For the reasons stated above, I recommend you rule in favor of the plaintiff." B. "You will be committing a… read more
Chris M.
Chris M.
M.S.W. Social Work
Master's Degree
2,636 satisfied customers
Answer all these question in my pdf please asap! Question 4
Answer all these question in my pdf please asap!Question 4 of 20 : Select the best answer for the question. 4. What is entered into a cell that is typically numeric and can be used for calculations? A… read more
Chris M.
Chris M.
M.S.W. Social Work
Master's Degree
2,636 satisfied customers
Class: Gathering and Using Information in Criminal Justice
Class : Gathering and Using Information in Criminal Justice Due : 2/14/18 11:59pm (standard eastern time)50 questions Multiple Answers… read more
Susan Markel
Susan Markel
4th Grade Teacher
Bachelor\u0027s Degree
1 satisfied customers
Suppose I use Krispy Kremes (K) and loaves of bread (L) to
Suppose I use Krispy Kremes (K) and loaves of bread (L) to create my happiness or utility. I like to eat two Krispy Kreme doughnuts with every three loaves of French bread. What is my demand function … read more
GLENN
GLENN
Master of Mathematics
359 satisfied customers
An O-1 visa holder/ Canadian citizen is filing 1040 for the
An O-1 visa holder/ Canadian citizen is filing 1040 for the first year, 2017. Her husband is a French citizen, no days on US soil in 2017, no US income sources.Husband does not have ITIN.I am filing M… read more
NPVAdvisor
NPVAdvisor
CFP Licensee and Practitioner
Master's Degree
180 satisfied customers
I need help with a case study analysis please. 2.S.. has
hello I need help with a case study analysis please … read more
F. Naz
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,161 satisfied customers
Uses a spring with spring constant of 25N/m to fire a ball
John uses a spring with spring constant of 25N/m to fire a ball of mass 20g straight upwards. He extends the spring by 50cm. How far will it go?… read more
GLENN
GLENN
Master of Mathematics
359 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x