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. ALSO PLEASE EXPLAIN WHERE TO PLACE THE COURSE TEXT FILE

image text in transcribed

O UZA1 ReadTenfiletiandieleep Result - Naeans DELI File Edt View Navigate Source Refacter Run Debug Prefile Team Tools Window Help Q Search (Ce) cdefat config XSU2AL Readfexlertandetcep Rest.ja xD courses.tt x O UZAL Readtextie source Hetory --Q O Start Page L reproect System.out.println ("Teacher's Copy"); 23 0 test 24 Output - UZA1_ReadTextFiletandieExcep_Result (run) x courses.t O manfest.nf run: Teacher's Copy Course Code = IT2249 Credit hours 6 | Course title = Course Code = IT2230 | Credit hours = 3 | Course title = Course Code = IT4789 | Credit hours = 3 | Course title = Mobile Cloud Computing Application Development Introduction to Programming with Java Introduction to Database Systems BUILD SUCCESSFUL (total time: 0 seconds) 29:66 O UZA1 ReadTenfiletiandieleep Result - Naeans DELI File Edt View Navigate Source Refacter Run Debug Prefile Team Tools Window Help Q Search (Ce) cdefat config XSU2AL Readfexlertandetcep Rest.ja xD courses.tt x O UZAL Readtextie source Hetory --Q O Start Page L reproect System.out.println ("Teacher's Copy"); 23 0 test 24 Output - UZA1_ReadTextFiletandieExcep_Result (run) x courses.t O manfest.nf run: Teacher's Copy Course Code = IT2249 Credit hours 6 | Course title = Course Code = IT2230 | Credit hours = 3 | Course title = Course Code = IT4789 | Credit hours = 3 | Course title = Mobile Cloud Computing Application Development Introduction to Programming with Java Introduction to Database Systems BUILD SUCCESSFUL (total time: 0 seconds) 29:66

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions