Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me answer this question please!?? Java Programming QUESTION 1 Kolej Universiti Cerdik Bijaksana offers two elective courses that can be enrolled by many

image text in transcribed

image text in transcribed

Please help me answer this question please!?? Java Programming

QUESTION 1 Kolej Universiti Cerdik Bijaksana offers two elective courses that can be enrolled by many students from many programs. The following text file, enrollment.txt contains the enrollment records of students for courses CTU553 and CTU551: enrollment - Notepad File Edit Format View Help 2017412306; MUHAMMAD ALIF BIN RAMLEE;CS220;CTU553 2017427932;SITI LAILA FARHANA BINTI HISHAM; CS240;CTU553 2018695566;AMIR IMRAN BIN KAMALUDIN;CS230;CTU551 2019294224; NUR SYAHRINA BINTI GHAZALI;CS230;CTU551 2019328731; ZAKI HADRI BIN MOHD NIZAM;CS220;CTU553 2019335369; MUHAMAD HARITH BIN NOOR AFFANDEE;CS223;CTU553 2019685356; AZMIN BIN ZAMSANIRANI;CS226;CTU553 2019820038;AIN NAJMIN BINTI JAMALUDIN; CS230;CTU551 2020462348; INTAN SORFINA BINTI MOHD FADHIL;CS225;CTU553 2020496204; NUR HIDAYAH BINTI ISHAK; CS224;CTU551 2020615326; NURAIN SYAMIMI NADIA BINTI MOHD NASZERI;CS230;CTU553 2020834416; MUHAMMAD ZULFADLEY ADLI BIN AHMAD PAIZOL;CS230;CTU551 2020859198; NURAIN NATASYA BINTI MUHAMMAD NASIR; CS221;CTU553 2020896796; MOHAMAD EUSOFF DANIEL BIN MOHAMAD FAIZAL;CS230;CTU553 2020898308; MUHAMMAD SAIFUDDIN BIN IDRIS SHAZALI;CS221;CTU553 2020960723; FARAH DIYANA BINTI MOHAMAD FADZIR;CS230;CTU553 2020988441; NATASHA IRINA BINTI KHAIRUL ANNUAR; CS231;CTU551 2020988781; NUR ALYA NASRIN BINTI NODIN;CS223;CTU553 2017412124; MUHAMMAD SYAFI HAKIM BIN MOHD ZUHAIRI;CS223;CTU551 2017412136; ANNISA ATIKAH BINTI MOHD FADZIL;CS230;CTU553 2017412154; NURUL FATIN AMALIN BINTI SHAHBUDIN;CS230;CTU551 2017412298; NAZRIN AFZAL BIN MOHD BASIR SELVAM; CS224;CTU551 In 1, Col1 100% Windows (CRLF) UTF-8 Assume the text file consists of thousands of student records. The attributes for each record are student ID, student name, program and course. The following information is about class Enroll: Class: Enroll Attributes: String studID; String studName; String program; String course; Methods: //default constructor /ormal constructor //setter l/getters boolean isCTU551 () //returns true if the student register CTU551 toString() Write a complete JAVA program to perform the following tasks: a) Read the records from file enrollment.txt, one by one and store it in an Enroll object named enrolli. b) Count and display the number of students who register CTU551. c) Store the student ID and student name of CS240 students who register CTU553 into an output file named CS240_CTU553.txt. d) Write any ONE exception handling operations to deal with the file input-output errors. (15 marks)

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

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions