tried that before, got an error for the dob.getDay etc. And I NEED the dob. as in dateOfBirth = new Date(dob)
Type: Posts; User: ibby50
tried that before, got an error for the dob.getDay etc. And I NEED the dob. as in dateOfBirth = new Date(dob)
where abouts do i put them? in the Person copy?
i'm sorry I don't understand that
Ok, this is Date:
public class Date
{
// instance variables
private int day, month, year;
/**
ok done that, now its saying an error in Person copy()
cannot find symbol constructor Person(java.lang.String,char,java.lang.String)
the first one I tried and I got an error when I entered the date in BlueJ when creating the person. I entered it like 12,12,12
that right?
the second one it gave me an error in the new copy...
it doesn't. But I am not sure I can add more methods either to Date. Oh well.
I did find one thing. In the spec, it says my dateOfBirth instance variable should be class Date
does that change...
thats all great.
day, month, and year are all private in my Date class. and dateOfBirth is supposed to be in the Person class.
The following is from class Person:
public Person(String nme,...
sorry, nothing is supposed to inherit from the date class. I am supposed to set the date of birth as a date type in person depending on what the user inputs and then get the integers again as a string
public Date(int year, int month, int date)
{
year = this.year;
month = this.month;
setMonth(month);
date = this.date;
}
brings the error message:
I will try that code, although I am not totally sure if I am allowed to add more instance variables.
And I tried the code with the this.sex code and it brought back cannot find variable sex
Hey, yeah it would. But my spec specifies that dateOfBirth should be type Date. I have also just found out that in the controller I need to get the user to input a date of birth, but there isn't a...
Hi, I am doing an assignment that requires me to input a Person with the usual params - name, gender, address, insurance number and date of birth.
I have managed all but dateOfBirth. I will post...