please assist with prior problem other users have had with lesson 3. I keep getting undefined string when I inspect the scrapbook code. I have re-read and watched everything to make sure my code was right.
The method setName(String) is undefined for the type Person
The method getMaximumBooks(int) is undefined for the type Person
The method getName() is undefined for the type Person
Person p = new Person();
p.setName("Fred");
p.getMaximumBooks(10);
p.getName()
I have double checked the training documentation to see if I typed anything wrong, along with the checking the videos again. I still get this output which is not what the video displays. I do not understand this well enough yet to fix…any pointers?
This is the code I typed per instruction from the video, I didnt see anything wrong.
package org.totalbeginner.tutorial;
public class Person {
// fields
private String name; // name of the person
private int maximumBooks; // most books the person can check out
// constructors
public Person() {
name = "unknown name";
maximumBooks = 3;
}
//methods
public String getName() {
return name;
}
public void setName(String anyName) {
name = anyName;
}
public int getMaximumBooks() {
return maximumBooks;
}
public void setMaximumBooks(int maximumBooks) {
this.maximumBooks = maximumBooks;
}
}
SOMEONE F'N FIX THE SP4M FILTER THIS IS THE 3RD TIME IVE TYPED THIS
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
please assist with prior problem other users have had with lesson 3. I keep getting undefined string when I inspect the scrapbook code. I have re-read and watched everything to make sure my code was right.
The method setName(String) is undefined for the type Person
The method getMaximumBooks(int) is undefined for the type Person
The method getName() is undefined for the type Person
Person p = new Person();
p.setName("Fred");
p.getMaximumBooks(10);
p.getName()
I have double checked the training documentation to see if I typed anything wrong, along with the checking the videos again. I still get this output which is not what the video displays. I do not understand this well enough yet to fix…any pointers?
This is the code I typed per instruction from the video, I didnt see anything wrong.
package org.totalbeginner.tutorial;
public class Person {
// fields
private String name; // name of the person
private int maximumBooks; // most books the person can check out
// constructors
public Person() {
name = "unknown name";
maximumBooks = 3;
}
//methods
public String getName() {
return name;
}
public void setName(String anyName) {
name = anyName;
}
public int getMaximumBooks() {
return maximumBooks;
}
public void setMaximumBooks(int maximumBooks) {
this.maximumBooks = maximumBooks;
}
}
SOMEONE F'N FIX THE SP4M FILTER THIS IS THE 3RD TIME IVE TYPED THIS
UPDATE: SAVE YOUR WORK BEFORE INSPECTING OR RUNNING CODE