Trouble with Total Beginner tutorial lesson 3... SOLVED [message #901896] |
Tue, 14 August 2012 22:24 |
Ian Lewis Messages: 3 Registered: August 2012 |
Junior Member |
|
|
Scrapbook view displays this when inspected as per instructions in video 3.
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;
}
}
after trying to set eclipse as default program and double checking the default JDE I am still in the undefined string error...........ANYBODY KNOW WHY?! its hard to learn this from the video if im getting dialog telling me im doing something wrong. SOME ONE HELP A NEWCOMER OUT PLEASE
UPDATE: SAVE YOUR STUFF BEFORE RUNNING/INSPECTING, tip for all newbs
keywords: eclipse, lesson3, lesson03, lesson 3, undefined method, total beginners, java, error,
[Updated on: Wed, 15 August 2012 00:35] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09226 seconds