Welcome to the Most Reliable, Essay Writing Service on the internet

programming-assignment-13-rework-programming-assignment-12-but-instead-of-getting-the-integer-values

Mar 23

Programming Assignment 13 – Rework Programming Assignment 12, but instead of getting the integer values from the user via System.in, get only input and output file names from the user. The input file should contain the weight and integer values as specified below. (See Horstmann, pp. 319, 320, and pp.350, 351). Also, include a method called printResults that prompts the user for the name of an output file and then prints the results to that user-designated output file.

1. Create, using NetBeans, a complete Java program called CalcWeightedAvg according to the following guidelines.

Your main program should contain just three lines like these:

ArrayList<Double> inputValues = getData(); double weightedAvg = calcWeightedAvg(inputValues); printResults(inputValues, weightedAvg);

The inputValues come from a single line in a text file such as the following: 0.5 70 80 90 10

The output file should contain something like the following: “The weighted average of the numbers is 40, when using the data 0.5 70 80 90 10, where 0.5 is the weight, and the average is computed after dropping the lowest of the rest of the values.”

To create the input file, while in NetBeans with your project open, click to highlight the top-level folder of your project, which should be called CalcWeightedAvg. Then File-→New File… Keep the Project name at the top; keep Filter blank

Categories → Other (at the bottom of the categories list) File Types → Empty File (at the bottom of the files list) Next> FileName: data.txt Folder: this should be blank; if it’s not, delete whatever’s there

Finish

In the empty file data.txt that you just created, add a single line of data like the example above, where the first number is a double (greater than 0.0 and less than or equal to 1.0) and the other numbers are the values you’ll work with. Also, instead of displaying the output to the console, let the user choose a file name (as in Horstmann’s example), and write the output to a file with that user-supplied name (e.g., output.txt).

Thoughts:

*) It’s important that your input file is where NetBeans will look to find it. The above instructions should make sure that that happens.

*) Note that if you run this progam from the command line, the input file should be in the same directory as the .class file.

  

CLIENT TESTIMONIALS

The Service Is Okay. I won’t Complain

The writers on the website are courteous and the customer service responds quickly. My paper was handled well; They promised...

Writers here are very professional and are native British

Thanks a lot for helping me out with my PhD Thesis, Writers here are very professional and are native British!!

Jack, The United Kingdom

Very Very Helpful, and On time.

Very Very Helpful, and On time.

Adelio M, Spain

I scored complete A’s in 3 out of four courses

I scored complete A’s in 3 out of four courses

Anonymous, Illinoi Chicago

CLICK HERE  To order your paper

About Essaysmiths Assignment writing service

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for upto 20% off in their first Order. Our payment method is safe and secure.

 CLICK HERE to Order Your Assignment

 

Get access to cheap essays online, and forget about all your worries

Quality assurance

When we accept your assignment order, we treat it with the utmost seriousness. This means that only the best experts will conduct research on your topic and that they will deliver your paper only after making sure that it is insightful.

Total confidentiality

We use the SSL protocol to ensure that all the details of our customers are 100% safe and secure. So, forget about all worries when sharing personal information on our site. We never disclose the details of our clients.

All round service

24/7 customer support. We don’t want you to fail to submit your paper. So, we work 24 hours a day and 7 days a week to provide you with instant feedback.

Original Essays

One of the key principles of our work is to be creative and original. We hire only talented and experienced essay writers that are able to create authentic papers. Each regular essay or term paper is written from scratch in accordance with all your guidelines.

Cheap Service

Compared to our competitors, we offer a relatively cheap service. We allow you the comfort of a cheap paper writing service to improve your grades. If you are facing an academic problem, we’ll solve it by asking for a fair price.

Rocket fast Essay writing service

Don’t worry! We work in a timely manner to deliver orders before the due date. You’ll have enough time to check whether the finished paper corresponds to all your requirements. If not, provide us with feedback and ask for a revision.

Order Your Essay Today From  reliable Essay writing Service.

Order your Assignment today and save 15% with the discount code ESSAYHELP

X