Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer All The Question. Kolej Universiti Cerdik Bijaksana offers two elective courses that can be enrolled by many students from many programs. The following text

Answer All The Question. image text in transcribed
image text in transcribed
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: 2017412306; MUHOD ALIF BIN RAMLEE:C8220;CTUS53 2017027932,51T1 LATLA FARHANA BINTI HISHAM, C5248;CTU553 2018695566; AMIR THAN BIN KAMALUDIN;CS230;CTU551 2019214224; NUR SYAHRINA BINTI GHAZALT;05230;CTU551 2019328731,ZAT HARI BIN MOHD NIZAM:C5220;CTU553 2019335369, MUHAMAD HARITH BIN NOOR AFFANDEE;C5223;CTU553 219685356;AZKIN BIN ZASMIRANTCS226;CTU553 ze1920038;AIN NAJMIN BINTI JAMALUDIN CS230,CTUS51 2020062341; INTAN SORSTNA BINTI MOHD FICHIE;C5225;CTU553 2020096204; NUR HIDAYAH BINTI ISHAK;C5224;CTU551 2020615326, NURAIN SYAMIMI NADIA BINTI MOHD NASZERI:C8230;CTU553 2020834416, MWMAD ZULFADLEY ADLI BIN AHMAD PAIZOLCS230,CTUSSI 2020859198, NURAIN NATASYA BINTT PUHAPO NASTR;C5221;CTU553 2028896796, MOHAMAD EUSOFF DANIEL BIN MOHAMAD FAIZAL;CS230;CTU553 2020098380, MUHAMMAD SAIFUDOIN BIN IDRIS SHAZALI,CS221;CTU553 2020960723,FARAH BI MOK FA CS230,CTUSS3 2020968441; NATASHA IRINA BINTI KHAIRUL ANUAR;C5231;CTU551 2020988781; NUR ALYA NASRIN BINTI HODIN;CS223;CTU553 2017412124, MUHAMMAD SYAFI HAKIM BIN MOHD ZUHAIRI;CS223;CTU551 2017412136; ANNISA ATIKAH BINTI MOHD FADZIL;CS230,CTUS53 2017412154; NURUL FATIN AMALIN BINTI SHAHBUDIN;CS230;CTU551 2017412298; NAZRIN AFZAL BIN MOHD BASIR SELVAM;CS224;CTU551 Lal Coll 100% Wadows (CRL UTF- 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: I/default constructor Iormal constructor I/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 enrolll. 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

More Books

Students also viewed these Databases questions

Question

Question What is the doughnut hole in HSA coverage?

Answered: 1 week ago