On Mar 1, 1:04 am, el mio uno y dos <[email protected]> wrote:
> My question is the following , in the exercise asks:
> -Create a Student class as following:
>
> The Student class has StudentRecord class as an instance variable.  Name it 
> as studentRecord.
>
> You can use the StudentRecord class from the MyStudentRecordExampleProject 
> above or you can create a new one - the only requirement is that it has to 
> have at least one instance variable of its own.
>
> I have instance StudenRecor from Studen, but, that wants that it does with 
> her?:
> public class Student {
>  //Declaramos variables
>
>     private int studentId=0;
>     private static int studentCount = 0;
>
>     StudentRecord studentrecord= new StudentRecord();
>
> Display the information of each student including the student id, name.
>
> -They want that it shows all the information of the student or  only id and 
> the name?
> - I do not have any instacia of StudenRecord to add students, Whatever I must 
> put?
Based on provided above class, you could create a 1.constructor in
Student, and 2.use studentCount as id. Hints in Main below.

// Create students in Main, as such:
Student.increaseStudentCount();
int id=Student.getStudentCount();
StudentRecord rec=new StudentRecord("Anna");
Student anna=new Student(id,rec);

>
> I hope not to be annoying with so many questions. Greetings from Spain .
Cheers!
> _________________________________________________________________
> Consigue gratis el nuevo Messenger. ¡Descárgatelo!http://download.live.com/

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to