scJohn
asked on
errors with .get
hello, i have a test program for a class. I am getting errors for every line that i have I use ".get". All errors say "TeststereoType.java [10:1] cannot resolve symbol" and point to ".get"
this is what i have:
//class: TeststereoType
public class TeststereoType
{
public static void main(String [] args)
{
//Test defualt construtor, accessor moethods
//mutator methods, and equals method
stereoType stereoType1 = new stereoType();//invoke default constructor
System.out.println("Name: " + stereoType1.getname());
System.out.println("Catalo ge Numer: " + stereoType1.getcatNum());
System.out.println("Price: " + stereoType1.getprice());
System.out.println("Quanti ty on hand: " + stereoType1.getquantityAva ilable());
System.out.println();
stereoType1.setname("Kenwo od");
stereoType1.setcatNum("N05 12");
stereoType1.setprice("87.9 9");
stereoType1.setquantityAva ilable("5" );
System.out.println("Name: " + stereoType1.getname());
System.out.println("Catalo ge Numer: " + stereoType1.getcatNum());
System.out.println("Price: " + stereoType1.getprice());
System.out.println("Quanti ty on hand: " + stereoType1.getquantityAva ilable());
System.out.println();
Am i doing something realy stupid or do you think its in the other class? i cant figure this out.
this is what i have:
//class: TeststereoType
public class TeststereoType
{
public static void main(String [] args)
{
//Test defualt construtor, accessor moethods
//mutator methods, and equals method
stereoType stereoType1 = new stereoType();//invoke default constructor
System.out.println("Name: " + stereoType1.getname());
System.out.println("Catalo
System.out.println("Price:
System.out.println("Quanti
System.out.println();
stereoType1.setname("Kenwo
stereoType1.setcatNum("N05
stereoType1.setprice("87.9
stereoType1.setquantityAva
System.out.println("Name: " + stereoType1.getname());
System.out.println("Catalo
System.out.println("Price:
System.out.println("Quanti
System.out.println();
Am i doing something realy stupid or do you think its in the other class? i cant figure this out.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In Java a private field 'x' should have an accessor called getX() and a mutator called setX()
ASKER
that was the first thing i checked. It still shows the same errors.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> I am getting errors for every line that i have I use ".get".
So the first line with an error is
>> System.out.println("Name: " + stereoType1.getname());
Right?
Can you post the code of your stereoType class?
So the first line with an error is
>> System.out.println("Name: " + stereoType1.getname());
Right?
Can you post the code of your stereoType class?
ASKER
thats the problem, thanks guys
>> thats the problem
What's the problem?
What's the problem?
(Which is what i said at first). scJohn, can you tell me why you accepted that comment as the only answer please?
>> can you tell me why you accepted that comment as the only answer please?
Hi CEHJ, that's exactly what I was going to ask as the next question ;°)
Hi CEHJ, that's exactly what I was going to ask as the next question ;°)
ASKER
sorry, how do you except more than one answer? im new at this.
But before you can re-accept this question, it should first be reopened by a moderator or page editor.
To reopen this question, post a zero-point question in https://www.experts-exchange.com/Community_Support/
Subject: Moderator Please Reopen
Body: Please reopen this question:
https://www.experts-exchange.com/questions/21412265/errors-with-get.html
>> im new at this
Then reading the Help would be a good idea.
>> how do you except more than one answer?
I quote from the help pages:
More than one Expert helped solve my problem. What do I do?
You split the points. Scroll down to the bottom of the question and click the "Split Points" link at the bottom of the page.
Select the radio button of the comment who you want to Accept as the answer.
Only one button can be selected. Set the point value (a text box above the comment) of how much you want this person
to receive of the points.
Then set the point values for each of the experts comments to whom you want to allocate points
and these will be considered Assisted answers in helping you resolve the issue.
Double check your information and then click the Submit button at the bottom of the page.
One note: the total points of the splits must equal the amount you asked the question for itself,
and no person can receive fewer than 20 points.
To reopen this question, post a zero-point question in https://www.experts-exchange.com/Community_Support/
Subject: Moderator Please Reopen
Body: Please reopen this question:
https://www.experts-exchange.com/questions/21412265/errors-with-get.html
>> im new at this
Then reading the Help would be a good idea.
>> how do you except more than one answer?
I quote from the help pages:
More than one Expert helped solve my problem. What do I do?
You split the points. Scroll down to the bottom of the question and click the "Split Points" link at the bottom of the page.
Select the radio button of the comment who you want to Accept as the answer.
Only one button can be selected. Set the point value (a text box above the comment) of how much you want this person
to receive of the points.
Then set the point values for each of the experts comments to whom you want to allocate points
and these will be considered Assisted answers in helping you resolve the issue.
Double check your information and then click the Submit button at the bottom of the page.
One note: the total points of the splits must equal the amount you asked the question for itself,
and no person can receive fewer than 20 points.
ASKER
ok, i will do that. again sorry.
>> again sorry
No problem.
No problem.
isn't it CEHJ?
;°)
;°)
Yes, thanks.
:-) and thank you zzynx
:)