Gregorian Calendar -


one part of assignment requires me use gregorian calendar in student class.

every student has unique studentnumber (int), name (string), **

dateregistered (gregoriancalendar)

** , id (string) , courseenrolled (courseoffering).

import java.util.calendar; import java.util.gregoriancalendar;  public abstract class student {     private int studentnumber;     private string name;     private string id;     private courseoffering courseenrolled;     private gregoriancalendar startdate = new gregoriancalendar();      public student( int studentnumber, string name, string id, courseoffering courseenrolled){         this.studentnumber = studentnumber;         this.name = name;         this.id = id;         this.courseenrolled = courseenrolled;     }      public int getstudentnumber(){         return studentnumber;     }      public string tostring(){         return string.format("%08d", studentnumber) + "          " + name + "     " + id;     }  } 

i wasn't taught on how use calendar in school yet, came assignment.

"the constructor necessary initializations given necessary values including day (int), month (int) , year (int) of registration date "

how put day month year in constructor ? guys :(


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -