You are given a text file named college_application.txt which contains a list of applications for residential...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
You are given a text file named college_application.txt which contains a list of applications for residential colleges at UITM Shah Alam. The data is comprised of the application submission date, student id, name, faculty, semester, and home address. The home address consists of the street name, postcode, city, and state separated by a comma. 13/01/2022;20212897; Male; Imaad bin Jaad; FPA; 8; Jalan Perajurit, 42000, Pelabuhan Klang, Selangor 22/01/2022;20209621;Male; Zaki bin Hamza; FSPU; 6; Kubang Buaya, 12300, Butterworth, Pulau Pinang 26/01/2022;20213740; Female; as Ayu binti Selamat; FSPU; 8; Jalan Ru (1-3), 11500, Ayer Itam, Pulau Pinang 13/02/2022;20218909; Female; Alidia Bernardet; FSG;6; Jalan Padang Lalang, 84900, Tangkak, Johor 21/01/2022;20211475;Male; Deraman bin Mamat;FSKM; 3; Taman Kawan, 35500, Bidor, Perak 06/01/2022;20224614; Female; Haaniya binti Sufyaan; FSPU; 3; Taman Berkat (1 & 2),84000, Muar, Johor 02/02/2022;20212993; Male; Deraman bin Kamis;FKA; 3; Kampung Batu Bekarang, 98700, Limbang, Sarawak 13/02/2022;20219484;Male;Nawfal bin Wajdi;FKE; 8; Perkampungan Pandan Jaya, 26070, Kuantan, Pahang 02/01/2022;20218979; Female; Taqiyya binti Zainuddeen; FPA; 7; Jalan Permata 7/1,40000, Shah Alam, Selangor 04/01/2022;20215384; Male; Shandie Mariyushkin; FPA; 1; Kampung Baru Kuala Sungai Baru, 78200, Kuala Sungai Baru, Melaka 03/01/2022;20207854; Female; Aneesa binti Muhyddeen; FKE;5; Taman Mesra Indah, 8100, Bedong, Kedah 05/02/2022:20212823; Male; Jusoh bin Daud; FKE; 7; Lorong Orkid, 88300, Kota Kinabalu, Sabah 25/01/2022;20217497; Female; Guglielma Bartholin; FPA; 2; Astaka Heights, 56100, Kuala Lumpur, Kuala Lumpur Figure 1: college_application.txt Write a complete Java program using File I/O operation that can perform the following tasks: a) Read all records from the text file named college_application. txt in Figure 1. successful residential college applications into b) Write successful applications.txt. Since the number of rooms is limited, only students that meet any of the following criteria will be accepted: Students that are in semester 5 and above Students from Sabah or Sarawak A sample of successful_applications.txt is shown in Figure 2. 13/01/2022;20212897; Male; Imaad bin Jaad; FPA; 8; Jalan Perajurit, 42000, Pelabuhan Klang, Selangor 22/01/2022;20209621;Male; Zaki bin Hamza; FSPU; 6; Kubang Buaya, 12300, Butterworth, Pulau Pinang 26/01/2022;20213740; Female; as Ayu binti Selamat;FSPU; 8; Jalan Ru (1 3), 11500, Ayer Itam, Pulau Pinang 13/02/2022;20218909; Female; Alidia Bernardet;FSG; 6; Jalan Padang Lalang, 84900, Tangkak, Johor 02/02/2022;20212993; Male; Deraman bin Kamis;FKA; 3; Kampung Batu Bekarang, 98700, Limbang, Sarawak 13/02/2022;20219484; Male;Nawfal bin Wajdi;FKE; 8; Perkampungan Pandan Jaya, 26070, Kuantan, Pahang | c) Applications from students that do not meet any of the criteria in b) but the application submission date is in January will be placed on the waiting list. Write their information to waiting list.txt as shown in Figure 3. 21/01/2022;20211475; Male; Deraman bin Mamat;FSKM; 3; Taman Kawan, 35500, Bidor, Perak 06/01/2022;20224614; Female; Haaniya binti Sufyaan; FSPU; 3; Taman Berkat (1 & 2),84000 Muar, Johor 04/01/2022;20215384; Male; Shandie Mariyushkin; FPA; 1; Kampung Baru Kuala Sungai Baru, 78200, Kuala Sungai Baru, Melaka 25/01/2022;20217497; Female; Guglielma Bartholin; FPA; 2; Astaka Heights, 56100, Kuala Lumpur, Kuala Lumpur 02/01/2022;20217082; Female; Susana Hessle; FKM; 2; Sira Kulim, 33300, Gerik, Perak 20/01/2022;20201382; Female; Atiyya binti Humaid; FSPU;4; Jalan Panji Alam,21100, Kuala Terengganu, Terengganu Figure 3: waiting_list.txt d) Display on the screen the number of successful applications and the number of applications on the waiting list. e) Close all file streams in use. f) Apply exception handling mechanism in the program. You are given a text file named college_application.txt which contains a list of applications for residential colleges at UITM Shah Alam. The data is comprised of the application submission date, student id, name, faculty, semester, and home address. The home address consists of the street name, postcode, city, and state separated by a comma. 13/01/2022;20212897; Male; Imaad bin Jaad; FPA; 8; Jalan Perajurit, 42000, Pelabuhan Klang, Selangor 22/01/2022;20209621;Male; Zaki bin Hamza; FSPU; 6; Kubang Buaya, 12300, Butterworth, Pulau Pinang 26/01/2022;20213740; Female; as Ayu binti Selamat; FSPU; 8; Jalan Ru (1-3), 11500, Ayer Itam, Pulau Pinang 13/02/2022;20218909; Female; Alidia Bernardet; FSG;6; Jalan Padang Lalang, 84900, Tangkak, Johor 21/01/2022;20211475;Male; Deraman bin Mamat;FSKM; 3; Taman Kawan, 35500, Bidor, Perak 06/01/2022;20224614; Female; Haaniya binti Sufyaan; FSPU; 3; Taman Berkat (1 & 2),84000, Muar, Johor 02/02/2022;20212993; Male; Deraman bin Kamis;FKA; 3; Kampung Batu Bekarang, 98700, Limbang, Sarawak 13/02/2022;20219484;Male;Nawfal bin Wajdi;FKE; 8; Perkampungan Pandan Jaya, 26070, Kuantan, Pahang 02/01/2022;20218979; Female; Taqiyya binti Zainuddeen; FPA; 7; Jalan Permata 7/1,40000, Shah Alam, Selangor 04/01/2022;20215384; Male; Shandie Mariyushkin; FPA; 1; Kampung Baru Kuala Sungai Baru, 78200, Kuala Sungai Baru, Melaka 03/01/2022;20207854; Female; Aneesa binti Muhyddeen; FKE;5; Taman Mesra Indah, 8100, Bedong, Kedah 05/02/2022:20212823; Male; Jusoh bin Daud; FKE; 7; Lorong Orkid, 88300, Kota Kinabalu, Sabah 25/01/2022;20217497; Female; Guglielma Bartholin; FPA; 2; Astaka Heights, 56100, Kuala Lumpur, Kuala Lumpur Figure 1: college_application.txt Write a complete Java program using File I/O operation that can perform the following tasks: a) Read all records from the text file named college_application. txt in Figure 1. successful residential college applications into b) Write successful applications.txt. Since the number of rooms is limited, only students that meet any of the following criteria will be accepted: Students that are in semester 5 and above Students from Sabah or Sarawak A sample of successful_applications.txt is shown in Figure 2. 13/01/2022;20212897; Male; Imaad bin Jaad; FPA; 8; Jalan Perajurit, 42000, Pelabuhan Klang, Selangor 22/01/2022;20209621;Male; Zaki bin Hamza; FSPU; 6; Kubang Buaya, 12300, Butterworth, Pulau Pinang 26/01/2022;20213740; Female; as Ayu binti Selamat;FSPU; 8; Jalan Ru (1 3), 11500, Ayer Itam, Pulau Pinang 13/02/2022;20218909; Female; Alidia Bernardet;FSG; 6; Jalan Padang Lalang, 84900, Tangkak, Johor 02/02/2022;20212993; Male; Deraman bin Kamis;FKA; 3; Kampung Batu Bekarang, 98700, Limbang, Sarawak 13/02/2022;20219484; Male;Nawfal bin Wajdi;FKE; 8; Perkampungan Pandan Jaya, 26070, Kuantan, Pahang | You are given a text file named college_application.txt which contains a list of applications for residential colleges at UITM Shah Alam. The data is comprised of the application submission date, student id, name, faculty, semester, and home address. The home address consists of the street name, postcode, city, and state separated by a comma. 13/01/2022;20212897; Male; Imaad bin Jaad; FPA; 8; Jalan Perajurit, 42000, Pelabuhan Klang, Selangor 22/01/2022;20209621;Male; Zaki bin Hamza; FSPU; 6; Kubang Buaya, 12300, Butterworth, Pulau Pinang 26/01/2022;20213740; Female; as Ayu binti Selamat; FSPU; 8; Jalan Ru (1-3), 11500, Ayer Itam, Pulau Pinang 13/02/2022;20218909; Female; Alidia Bernardet; FSG;6; Jalan Padang Lalang, 84900, Tangkak, Johor 21/01/2022;20211475;Male; Deraman bin Mamat;FSKM; 3; Taman Kawan, 35500, Bidor, Perak 06/01/2022;20224614; Female; Haaniya binti Sufyaan; FSPU; 3; Taman Berkat (1 & 2),84000, Muar, Johor 02/02/2022;20212993; Male; Deraman bin Kamis;FKA; 3; Kampung Batu Bekarang, 98700, Limbang, Sarawak 13/02/2022;20219484;Male;Nawfal bin Wajdi;FKE; 8; Perkampungan Pandan Jaya, 26070, Kuantan, Pahang 02/01/2022;20218979; Female; Taqiyya binti Zainuddeen; FPA; 7; Jalan Permata 7/1,40000, Shah Alam, Selangor 04/01/2022;20215384; Male; Shandie Mariyushkin; FPA; 1; Kampung Baru Kuala Sungai Baru, 78200, Kuala Sungai Baru, Melaka 03/01/2022;20207854; Female; Aneesa binti Muhyddeen; FKE;5; Taman Mesra Indah, 8100, Bedong, Kedah 05/02/2022:20212823; Male; Jusoh bin Daud; FKE; 7; Lorong Orkid, 88300, Kota Kinabalu, Sabah 25/01/2022;20217497; Female; Guglielma Bartholin; FPA; 2; Astaka Heights, 56100, Kuala Lumpur, Kuala Lumpur Figure 1: college_application.txt Write a complete Java program using File I/O operation that can perform the following tasks: a) Read all records from the text file named college_application. txt in Figure 1. successful residential college applications into b) Write successful applications.txt. Since the number of rooms is limited, only students that meet any of the following criteria will be accepted: Students that are in semester 5 and above Students from Sabah or Sarawak A sample of successful_applications.txt is shown in Figure 2. 13/01/2022;20212897; Male; Imaad bin Jaad; FPA; 8; Jalan Perajurit, 42000, Pelabuhan Klang, Selangor 22/01/2022;20209621;Male; Zaki bin Hamza; FSPU; 6; Kubang Buaya, 12300, Butterworth, Pulau Pinang 26/01/2022;20213740; Female; as Ayu binti Selamat;FSPU; 8; Jalan Ru (1 3), 11500, Ayer Itam, Pulau Pinang 13/02/2022;20218909; Female; Alidia Bernardet;FSG; 6; Jalan Padang Lalang, 84900, Tangkak, Johor 02/02/2022;20212993; Male; Deraman bin Kamis;FKA; 3; Kampung Batu Bekarang, 98700, Limbang, Sarawak 13/02/2022;20219484; Male;Nawfal bin Wajdi;FKE; 8; Perkampungan Pandan Jaya, 26070, Kuantan, Pahang | c) Applications from students that do not meet any of the criteria in b) but the application submission date is in January will be placed on the waiting list. Write their information to waiting list.txt as shown in Figure 3. 21/01/2022;20211475; Male; Deraman bin Mamat;FSKM; 3; Taman Kawan, 35500, Bidor, Perak 06/01/2022;20224614; Female; Haaniya binti Sufyaan; FSPU; 3; Taman Berkat (1 & 2),84000 Muar, Johor 04/01/2022;20215384; Male; Shandie Mariyushkin; FPA; 1; Kampung Baru Kuala Sungai Baru, 78200, Kuala Sungai Baru, Melaka 25/01/2022;20217497; Female; Guglielma Bartholin; FPA; 2; Astaka Heights, 56100, Kuala Lumpur, Kuala Lumpur 02/01/2022;20217082; Female; Susana Hessle; FKM; 2; Sira Kulim, 33300, Gerik, Perak 20/01/2022;20201382; Female; Atiyya binti Humaid; FSPU;4; Jalan Panji Alam,21100, Kuala Terengganu, Terengganu Figure 3: waiting_list.txt d) Display on the screen the number of successful applications and the number of applications on the waiting list. e) Close all file streams in use. f) Apply exception handling mechanism in the program. c) Applications from students that do not meet any of the criteria in b) but the application submission date is in January will be placed on the waiting list. Write their information to waiting list.txt as shown in Figure 3. 21/01/2022;20211475; Male; Deraman bin Mamat;FSKM; 3; Taman Kawan, 35500, Bidor, Perak 06/01/2022;20224614; Female; Haaniya binti Sufyaan; FSPU; 3; Taman Berkat (1 & 2),84000 Muar, Johor 04/01/2022;20215384; Male; Shandie Mariyushkin; FPA; 1; Kampung Baru Kuala Sungai Baru, 78200, Kuala Sungai Baru, Melaka 25/01/2022;20217497; Female; Guglielma Bartholin; FPA; 2; Astaka Heights, 56100, Kuala Lumpur, Kuala Lumpur 02/01/2022;20217082; Female; Susana Hessle; FKM; 2; Sira Kulim, 33300, Gerik, Perak 20/01/2022;20201382; Female; Atiyya binti Humaid; FSPU;4; Jalan Panji Alam,21100, Kuala Terengganu, Terengganu Figure 3: waiting_list.txt d) Display on the screen the number of successful applications and the number of applications on the waiting list. e) Close all file streams in use. f) Apply exception handling mechanism in the program.
Expert Answer:
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
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...
-
Markku Antero Oy produces perfume. To make this perfume, Markku Antero uses three different types of fluid. Tartarus, Erebus and Uranus are used in standard proportions of -14-0, -3- 10 and -3- 10,...
-
According to the information in Table 10.2, which product had (a) The largest price increase in 2014? (b) The biggest price decline in 2014? TABLE 10.2 Item _________ Price Change in 2014 (Percent)...
-
Describe the location of a number x on the number line when (a) x > 0 (b) x < 4.
-
FRAUD PREVENTION AND DETERRENCE IN ACTION Assume the following facts: thirty-day collection period. The invoice is used to post-sales to the accounting system. Checks are received in the mailroom and...
-
Partnership Income and Basis Adjustments. Mark and Pamela are equal partners in MP partnership. The partnership, Mark, and Pamela are calendar year taxpayers. The partnership incurred the following...
-
distributed database management system, are there any concerns or issues managing distributed database management systems, and if so, why?
-
Dobson Manufacturing Company uses a job order cost system with manufacturing overhead applied to products on the basis of direct labor dollars. At the beginning of the most recent period, the company...
-
In 1808, the (legal) international slave trade ended. Over the next fifty years, the American South developed a complex slave society. Choose one element of that society (plantation owner, white...
-
List the following 8 ASX listed companies in order ofthe stranded asset risk you expect they are exposed to. Which combination of companies would you go long and which would you short in order to...
-
Was the CDC authentic in its COVID messaging to the public? Include references if used.
-
You are a market maker in Qantas shares (QAN). You believe that, at the end of the session, QAN stock will be worth $5.80 (80% probability) or $6.00 (20% probability). Typically, 90% of incoming...
-
1. Matrix A and matrix B are defined as below. [1 2 3] A = 4 5 6 L7 8 91 B = y (5%) (a) Can we perform the matrix multiplication for B*A? If we can, what's the result? (5%) (b) Can we perform the...
-
The following statements about the FASEA Code of Ethics is TURE OR FALSE???? A financial adviser occasionally shirks their responsibilities to always provide clients with a Financial Services Guide...
-
a) What is the linearization L(x) of a function f (x) at a point x = a. What is required of f at a for the linearization to exist? How is linearization used? Give examples.
-
Aztec Furnishings makes hand-crafted furniture for sale in its retail stores. The furniture maker has recently installed a new assembly process, including a new sander and polisher. With this new...
-
Write a program that will read a text file that contains an unknown number of movie review scores. Read the scores as Double values and put them in an instance of ArrayList. Compute the average score.
-
Repeat Programming Project 10 from Chapter 5, but include constructors. Programming Project 10 Consider a class Movie that contains information about a movie. The class has the following attributes:...
-
Define a class called TicTacToe. An object of type TicTacToe is a single game of tic-tactoe. Store the game board as a single two-dimensional array of base type char that has three rows and three...
-
A diffraction grating is a closely spaced array of apertures or obstacles forming a series of closely spaced slits. The simplest type in which an incoming wave front meets alternating opaque and...
-
Find the position of the first minimum for a single slit of width 0.04 \(\mathrm{mm}\) on a screen of \(2 \mathrm{~m}\) distance, when light from a He-Ne laser \(\lambda=\) 6328 is shone on the slit.
-
A GaAs p-n junction has a \(100 \mu \mathrm{m} \times 100 \mathrm{~m}\) cross section and a width of the depletion layer \(W=440 \mathrm{~nm}\). Consider the junction in thermal equilibrium without...
Study smarter with the SolutionInn App