Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: Homework netbeans
- 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 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+
Posted 7-Mar-13 4:04am
Edited 7-Mar-13 4:35am
ThePhantomUpvoter at 7-Mar-13 9:10am
This is just a copy/paste of your homework assignment. No one here is going to do it for you.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
Try it yourself, you may find it is not as difficult as you think!
soname at 7-Mar-13 10:36am
ok i just need to know
how to read from a file
using another class
OriginalGriff at 7-Mar-13 10:43am
Google is your first stop:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 455
1 Sergey Alexandrovich Kryukov 312
2 DamithSL 179
3 King Fisher 179
4 Peter Leow 154
0 OriginalGriff 240
1 Maciej Los 95
2 Sascha Lefévre 85
3 King Fisher 70
4 F-ES Sitecore 55

Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 7 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100