Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

PLEASE EXPLAIN APPROACH TAKEN TO COMPLETE THIS APPLICATION

image text in transcribed

A Refind Result S DL File Est Vow Navigate Source Reactor Hun Debug Profile Team Tools Window Help Q. Search ( 1) L Readfexandetxe Resulta curetat - St Page X U2A1 ReadTextile buld 23 System.out.println("Teacher's Copy"); sest 24 Output - U2A1_ReadTextFileHandleExcep_Result (run) X count manifest.nl run: Teacher's Copy Course Code = IT2249 Credit hours = 6 Course title = Introduction to Programming with Java Course Code = IT2230 Credit hours = 3 | Course title = Introduction to Database Systems Course Code = IT4789 | Credit hours = 3 | Course title = Mobile Cloud Computing Application Development BUILD SUCCESSFUL (total time: 0 seconds)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases With Application To GIS

Authors: Philippe Rigaux, Michel Scholl, Agnès Voisard

1st Edition

1558605886, 978-1558605886

More Books

Students also viewed these Databases questions

Question

What are the pros and cons when 2 major restaurant chains merge?

Answered: 1 week ago