- Design and implement a Student class.
a. Each student has the following Data Fields:
studentFirstName,
studentLastName,
studentAddress,
studentBloodGroup must be: A, A-, B, B-, AB, AB-, O or O-. Nothing else.
studentCity.
Write the following elements :
Write a Constructor to initialize the values of the Data Fields (attributes). Write Accessor and Mutator methods for each data.
Write a tostring() method to print all the student information’s to
standard output.
Create a main class called StudentDemo.java that uses the student class.
a. Read student info’s from an input file students.txt and create a student object.
Sample file : Students.txt
200912345 ahmad shamsi 11th street, nakheel A+ Al Ain
201023456 asmaa Nuaimi zayed street, tawiya O Dubai
201124456 rached teniji matter road, lissali B+ Abu Dhabi
b. Write a method that generates for a student a file named id.txt that contents same as the following example:
200912345.txt
Student Id: 200912345
Student name: ahmad shamsi
Address: 11th street, nakheel
City: Al Ain
BloodType: A+