In this assessment, you design and code a Java console application that reads a text file...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In this assessment, you design and code a Java console application that reads a text file containing course information and prints out this information to the screen. The application will raise an exception if it encounters problems reading the text file. Your program output should look like the sample output provided in the "Read from a Text File and Handle Exceptions Instructions" course file. Complete instructions and required templates are included in the Resources. Your assignment will be scored on the following criteria: 1. Design a program that meets text file reading requirements. 2. Code an application that uses text I/O and exceptions. 3. Test the application and document this testing. 4. Explain the approach taken to complete this application and the major decisions made. 5. Communicate efficiently, effectively, and in an appropriate manner for an IT professional. Reading From a Text File and Handling Exceptions In this assessment, you will design and code a Java console application that reads a text file containing course information and prints out this information to the screen. The application will raise an exception if it encounters problems reading the text file. The requirements of this application are as follows: The application is to read a text file called "courses.txt" that resides in the home folder of the NetBeans project. The "courses.txt" contains information that describes three courses. Each course is described by three fields separated by spaces on a line by themselves. The three fields that describe a course are: • Course code • Course credit hours Course title The application is to read this text file and prints out its content on the screen for each course. If the application encounters an error, it should raise an exception, prints out an error message, and then exits the program. Use these three lines to populate the "course.txt" file: • IT2249 6 Introduction to Programming with Java ⚫ IT2230 3 Introduction to Database Systems ⚫ IT4789 3 Mobile Cloud Computing Application Development Successful completion of this assignment will show the correct content of the "courses.txt" printed out when the application is run. Your program output should look like this sample output: 23 24 System.out.println("Teacher's Copy"); run: Teacher's Copy Course Code IT2249 | Credit hours 6 Course title Course Code 172230 | Credit hours 3 Course title Course Code 174789 | Credit hours 3 Course title BUILD SUCCESSFUL (total time: 0 seconds) Introduction to Programming with Java Introduction to Database Systems Mobile Cloud Computing Application Development M Follow these steps to complete this assignment: 1. Create a NetBeans Java console application project called "U2A1_ReadTextFileHandleExcep". 2. Develop the application to meet the stated requirements. 3. Compile and test your application using the provided input data. 4. Make sure to document the result of your testing by taking screenshots of the result of running your application similar to the provided sample output. One screenshot is required for this assignment. 5. Explain the approach you took to complete this assignment and the major decisions you made. In this assessment, you design and code a Java console application that reads a text file containing course information and prints out this information to the screen. The application will raise an exception if it encounters problems reading the text file. Your program output should look like the sample output provided in the "Read from a Text File and Handle Exceptions Instructions" course file. Complete instructions and required templates are included in the Resources. Your assignment will be scored on the following criteria: 1. Design a program that meets text file reading requirements. 2. Code an application that uses text I/O and exceptions. 3. Test the application and document this testing. 4. Explain the approach taken to complete this application and the major decisions made. 5. Communicate efficiently, effectively, and in an appropriate manner for an IT professional. Reading From a Text File and Handling Exceptions In this assessment, you will design and code a Java console application that reads a text file containing course information and prints out this information to the screen. The application will raise an exception if it encounters problems reading the text file. The requirements of this application are as follows: The application is to read a text file called "courses.txt" that resides in the home folder of the NetBeans project. The "courses.txt" contains information that describes three courses. Each course is described by three fields separated by spaces on a line by themselves. The three fields that describe a course are: • Course code • Course credit hours Course title The application is to read this text file and prints out its content on the screen for each course. If the application encounters an error, it should raise an exception, prints out an error message, and then exits the program. Use these three lines to populate the "course.txt" file: • IT2249 6 Introduction to Programming with Java ⚫ IT2230 3 Introduction to Database Systems ⚫ IT4789 3 Mobile Cloud Computing Application Development Successful completion of this assignment will show the correct content of the "courses.txt" printed out when the application is run. Your program output should look like this sample output: 23 24 System.out.println("Teacher's Copy"); run: Teacher's Copy Course Code IT2249 | Credit hours 6 Course title Course Code 172230 | Credit hours 3 Course title Course Code 174789 | Credit hours 3 Course title BUILD SUCCESSFUL (total time: 0 seconds) Introduction to Programming with Java Introduction to Database Systems Mobile Cloud Computing Application Development M Follow these steps to complete this assignment: 1. Create a NetBeans Java console application project called "U2A1_ReadTextFileHandleExcep". 2. Develop the application to meet the stated requirements. 3. Compile and test your application using the provided input data. 4. Make sure to document the result of your testing by taking screenshots of the result of running your application similar to the provided sample output. One screenshot is required for this assignment. 5. Explain the approach you took to complete this assignment and the major decisions you made.
Expert Answer:
Answer rating: 100% (QA)
Heres the Java code for the console application that reads coursestxt and handles exceptions import javaioFile import javaioFileNotFoundException impo... View the full answer
Related Book For
Accounting Information Systems
ISBN: 978-1133935940
10th edition
Authors: Ulric J. Gelinas, Richard B. Dull
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Define price and name the various types of prices described in this chapter.
-
The Scottie Sweater Company produces sweaters under the "Scottie" label. The company buys raw wool and processes it into wool yarn from which the sweaters are woven. One spindle of wool yarn is...
-
Solve the following initial value problems and leave the solution in implicit form. Use graphing software to plot the solution. If the implicit solution describes more than one curve, be sure to...
-
Assuming the same data as given in problem 9, was the well in each case profitable? Discuss your answer. Problem 9:- Property cost (acquisition cost). Drilling cost (one well). Estimated completion...
-
Sharp Company manufactures a product for which the following standards have been set: During March, the company purchased direct materials at a cost of $55,650, all of which were used in the...
-
I am having trouble instaling Oracle database 11g express edition and SQL developer to my computer, validate your installation, and write a short 3- to 4-page paper with screenshots of your download....
-
Pumps and pumping station Pumping stations Example, cont: The table shows the performance of the single pump rotating at 1000rpm. 1. After all connections, compute the flow rate and head the pumping...
-
Your firm, Agrico Products, is considering a tractor that would have a cost of $36,000, would increase pretax operating cash flows before taking account of depreciation by $11,000 per year, and would...
-
sixty months ago, you got a loan from your bank for $10,000. This is a ten year loan with an APR of 12% and with monthly payments of $143.47 each. Today, you decided you want to pay off the loan in...
-
You decide to invest in a portfolio consisting of 30 percent Stock A, 30 percent Stock B, and the remainder in Stock C. Based on the following information, what is the expected return of your...
-
How do mitochondrial defects and dysfunction contribute to the pathogenesis of mitochondrial diseases, such as mitochondrial encephalomyopathy, lactic acidosis, and stroke-like episodes (MELAS), and...
-
#3 Specify what happens for each line of code. D[9] = 0 initially. Final value of Accumulator A = ? Instruction LDAA #$01 LDAB $09 BEQ label2 ABA label2 ABA Final Result Action
-
Use the central limit theorem to find the mean and standard error of the mean of the indicated sampling distribution. Then sketch a graph of the sampling distribution. The per capita consumption of...
-
Consider the following cash flows in Table P5.5. (a) Calculate the payback period for each project. (b) Determine whether it is meaningful to calculate a payback period for project D. (c) Assuming...
-
Jordyn Insurance Agency is negotiating for the acquisition of computer equipment from Prometheus Industries effective 1/1/XXXX. Jordyn Insurance Agency has asked for your assistance in evaluating the...
-
What are the comparative advantages of the various data coding types discussed in Technology Summary 5.2 when applied to each of the following? Discuss fully. a. Employee ID numbers b. Customer ID...
-
Find two sets of financial statements from companies within one industry. List any problems you have in comparing the balance sheets. Describe how using XBRL could help alleviate these problems.
-
Identify the sources and discuss the consequences of bank runs, bank panics, and financial crises.
-
Explain why and how the government intervenes in the financial system, and the problems the government safety net creates.
-
Deflation is the rate of decline in the aggregate price level. Why might unexpected deflation be of particular concern to someone managing a bank?
Study smarter with the SolutionInn App