Question 1 Given classes Student, Undergrad, and Grad that extend the base class Student. Build a test driver by creating a class TestStudent and do the following: Create an array of type Student with six slots. The plain text file Students.txt contains the information of six students (Do not make any changes to the file). • Read text data from the Students.txt to create a Grad ("G") or an Undergrad ("U") instance and store the object in the array. 1. All Undergrad instances should be located from index 0 to 2, and all Grad instances should be located from index 3 to 5. 2. File format example: U, 123456, Kungfu Panda, Senior, 95 G, 123457, Harry Potter, 12, Algorithms... • Write the information of each student stored in the array to the text file NewStudents.txt using the PrintStream class. Begin accessing the student data starting at index 0 then write it to the text file in an iterative fashion. • File format example: U, 123456, KungFu Panda, Senior, 95 U, 789456, Squidward Tentacles, Freshman, 15 G, 123457, Harry Potter, 12, Algorithms G, 321789, Patrick Star, 9, Data Science... Sample output: U, 456789, Ana, 74, Junior U, 794621, Gabriel, 95, Senior U, 890465, Sam, 36, Freshman G, 789456, Brian, 12, Structure and Meaning in Word Embedding G, 302178, Xiwei, 15, Machine Learning G, 296487, Cristina, 17, Probability Theory
Question 1 Given classes Student, Undergrad, and Grad that extend the base class Student. Build a test driver by creating a class TestStudent and do the following: Create an array of type Student with six slots. The plain text file Students.txt contains the information of six students (Do not make any changes to the file). • Read text data from the Students.txt to create a Grad ("G") or an Undergrad ("U") instance and store the object in the array. 1. All Undergrad instances should be located from index 0 to 2, and all Grad instances should be located from index 3 to 5. 2. File format example: U, 123456, Kungfu Panda, Senior, 95 G, 123457, Harry Potter, 12, Algorithms... • Write the information of each student stored in the array to the text file NewStudents.txt using the PrintStream class. Begin accessing the student data starting at index 0 then write it to the text file in an iterative fashion. • File format example: U, 123456, KungFu Panda, Senior, 95 U, 789456, Squidward Tentacles, Freshman, 15 G, 123457, Harry Potter, 12, Algorithms G, 321789, Patrick Star, 9, Data Science... Sample output: U, 456789, Ana, 74, Junior U, 794621, Gabriel, 95, Senior U, 890465, Sam, 36, Freshman G, 789456, Brian, 12, Structure and Meaning in Word Embedding G, 302178, Xiwei, 15, Machine Learning G, 296487, Cristina, 17, Probability Theory
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
100%
Expert Solution
Step 1
Please upvote me .I need it badly. Please. Please please.
I have coded this in java as per the requirements.
I have made some assumptions here as the code for the classes Student, Grad and UnderGrad were not provided.
I am making assumptions regarding the constructor of these three classes and I assume there is a display() function that return the string that was saved in the object.
Please upvote me .I need it badly. Please. Please please.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY