Click here to Skip to main content
Rate this: bad
good
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 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+
Posted 7-Mar-13 4:04am
soname318
Edited 7-Mar-13 4:35am
phil.o35.7K
v2
Comments
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
good
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!
  Permalink  
Comments
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:
 
https://www.google.co.uk/search?q=read+text+file+netbeans&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a&channel=fflb

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

  Print Answers RSS
0 Mathew Soji 274
1 BillWoodruff 270
2 Afzaal Ahmad Zeeshan 244
3 Sergey Alexandrovich Kryukov 240
4 Raul Iloc 160
0 OriginalGriff 6,219
1 Sergey Alexandrovich Kryukov 5,853
2 DamithSL 5,103
3 Manas Bhardwaj 4,549
4 Maciej Los 3,845


Advertise | Privacy | Mobile
Web01 | 2.8.1411019.1 | Last Updated 7 Mar 2013
Copyright © CodeProject, 1999-2014
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