I have a homework question that I'm a little thrown off by. Mostly because we haven't messed with strings much in class. Any help would be greatly appreciated.
Using the UML class diagram as a reference, complete the Student class declaration. (fill in the blanks)
class Person {
public String firstName;
public String lastName ;
public _____() { // constructor
lastName = "";
}
public void PayFees(double fee) {
/* ... */
}
} // end Person
class Student _________ __________ {
public String __________ ;
public void ChangeMajor(String major) {
__Major___ = major;
/* ... */
}
public void PayFees(double fee) {
/* … */
}
} // end
UML Diagram:
Person
______
firstName : String
lastName : String
_______
PayFees(double)
^
|
|
Student
______
major : String
_________
ChangeMajor(String)
PayFees(double)
What I need is the blanks filled in the Java code above. Thanks for your help