Creating a program that will generate a txt output file

Assignment Help Programming Languages
Reference no: EM131119675

ClassAverage

Objective:

• Creating a program that uses a .txt file as input

• Creating a program that will generate a .txt output file

• Exception Handling Requirements:

You'll be given a text file, called mstu4031_input.txt. That file will contain a list of grades.

Your job this week is to write a program that will read the file, and then generate an

output file that contains a class average and feedback. If the program cannot find the

input file in your BlueJ project directory, it will throw an IOException.

• Create a BlueJ project

• Add mstu4031_input.txt to the folder

• Now build your program

• Scanner Class

• DecimalFormat Class

• While loop

• Try/catch

• If/else if/else

• The program should produce a .txt output file (it will also live in the BlueJ folder)

o Call it "mstu4031_output.txt"

o List the values on separate lines

o Generate a class average

o Provide a feedback statement

MSTU4031: Lab - Calculating a Class Average Results should look something like this:

Lab 13

Input file name (from your computer): abc.txt

ERROR

Cannot locate the input file 'abc.txt' on your computer - please try again.

Input file name (from your computer): mstu4031_input.txt

What would you like to call your output file: mstu4031_output.txt

INPUT FILE FOUND, OUTPUT FILE GENERATED

Your input file, mstu4031_input.txt, has been found and accepted.

Your output file, mstu4031_output.txt, has been created.

mstu4031_output.txt is living in your BlueJ project directory.

Please open mstu4031_output.txt for the class's average and feedback. Results Screenshots:

Reference no: EM131119675

Questions Cloud

Define product placement : Define Product Placement. What are two product placement options? Why have marketers increased their use of product placements? How does the development of a creative strategy help the marketer?
Measure of an effective police administrator : The measure of an effective police administrator is often taken by how well the prepare, present, and execute the department budget. Please explain, with examples, what this means.
What is the main benefit of the benzodiazepine class : What is the main benefit of the benzodiazepine class with regard to usage as anesthetic induction agents
The merchandise was originally sold with a gross profit rate : The merchandise was originally sold with a gross profit rate of 30%. Prepare the entries on the books of Seaver Company to record all transactions related to Noble during 2010. (Ignore interest charges.)
Creating a program that will generate a txt output file : Creating a program that uses a .txt file as input. Creating a program that will generate a .txt output file. You'll be given a text file, called mstu4031_input.txt. That file will contain a list of grades.
Doctor freely prescribes these narcotics to people : do you think that doctors should face any legal consequences if they continue to prescribe narcotics to an individual over a long period of time, and it has become obvious that the doctor freely prescribes these narcotics to people?
Should the patient be started on tpn : Mrs. Hanes is a 62-year-old woman with metastatic breast cancer. She was admitted with dehydration and weakness. Should the patient be started on TPN
Installment sales default and repossession crawford : An oven that cost $1,200 was sold to Travis Longman for $1,500 on the installment basis. Longman made a down payment of $240 and paid $80 a month for six months, after which he defaulted. The oven was repossessed and the estimated fair value at time ..
One of the metrics used in non-traditional media : One of the metrics used in non-traditional media (internet, social media, etc.) is engagement. Explain what is meant by engagement and why it is important to the marketer. Studies have shown that email marketing is much more effective than traditiona..

Reviews

Write a Review

Programming Languages Questions & Answers

  Do you believe that html may have outlived its usefulness

HTML was the original Web page protocol, developed for hypertext documents on the emerging Web. Many different protocols and technologies have since been developed.

  Write class to represent temperatures in degree and celsius

Write a Temperature class that represents temperatures in degrees in Celsius, Fahrenheit and Kelvin. Use a floating-point number for the temperature and a character (type char) for the scale.

  Write a new class file with a main() method in the project

Write a new class file with a main() method in the same project, use it to load in the names.txt, sort the names, and store them to a file called, nameout.txt. Each name on its own line.

  Explain reverse, sort and binary search

Because the C# array is an object member of the Array class it also comes with a number of built-in methods such as Reverse, Sort and Binary Search. You can use the Reverse method

  Implement the factorial function in the io monad

Use imperative-style programming to implement the factorial function in the IO monad. In other words, create and initialize variables (references) using newIORef, modify their values using a while loop with ,readIORef and writeIORef, then have th..

  Determine the acceptable error for a given estimated time

Write a function that uses a switch statement to determine the acceptable error for a given estimated flight time, according to this table.

  Explain union command

The UNION command is used to select related information from two tables, much like the JOIN command. However, when using the UNION command all selected columns need to be of the same data type.

  Which of the above is an example of functional cohesion

Which of the above is an example of procedural cohesion?

  What is the throughput of the system

what is the throughput of the system

  Explain and evaluate post-fix expression

Many early calculators used a post-fix entry to perform arithmetic calculations. For example 2 + 3 in in-fix notation would be 2 3 + in post-fix notation. ( 2 + 3 ) * 4, would be 2 3 + 4 *. Utilizing a stack, post-fix expressions are very easily e..

  Write program which demands user to enter ten numbers

Write the program which demands user to enter 10 numbers (using an input box) and prints (using a message box) message ‘negative' if number is less than zero.

  Develop logic for program to read customer records

Develop the logic for a program that reads in 100 customer records and stores the first and last name and total purchases in three parallel arrays.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd