fired0g22's Profile
Reputation: -1
Dishonored
- Group:
- Active Members
- Active Posts:
- 53 (0.09 per day)
- Joined:
- 06-October 11
- Profile Views:
- 531
- Last Active:
Oct 11 2011 07:10 PM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: Polymorphism - Need Help
Posted 11 Oct 2011
pbl, on 11 October 2011 - 06:04 PM, said:
macosxnerd101, on 11 October 2011 - 08:38 PM, said:How is polymorphism relevant here?
There are a few discussions on this forum about what exactly ploymorphism is. And the discussions are surely not closed
Everybody has his grain on salt to put on.
But, even if I look at all possible understanding of the different concepts, really don't see how one of them would apply in your context.
Don' look at me, I didn't write the textbook. I asked the instructor about it, he said Java didn't support polymorphism. I showed him his assignment points to the textbook under polymorphism and all he said was oh ok. Now you see why I am having difficulty with this class. A noob learning from an idiot. Spells success huh. Anyways I am taking macosxnerd101 advice and playing with it and see what I can do. I know he wrote the line for me but want to make sure I understand it. -
In Topic: Polymorphism - Need Help
Posted 11 Oct 2011
I want to override inventValue(). I think I have the DigitalCamera class set up to do so. I have the inventValue() method set up in Cameras and DigitalCamera. Is this correct? I am very new to java and the book calls it polymorphism but that's a textbook for ya. -
In Topic: Beginner - Need help getting array to work.
Posted 6 Oct 2011
mind boggling huh? -
In Topic: Beginner - Need help getting array to work.
Posted 6 Oct 2011
} // end method main public void sort() { Camera temp; for(int i = 0; i<product.length -1; i++) for(int x = 0; x< product.length-1; x++) { if( product[x].displayItem().compareTo(prodcut[x+1].displayItem() > 0)) { temp = product[x]; product[x].displayItem() = product[x+1].displayItem(); product[x+1].displayItem() = temp; } } } } // end class InventoryProgram
java:36: error: non-static method sort() cannot be referenced from a static context
sort(); // sort array on output
^
pbl, on 06 October 2011 - 08:55 PM, said:This is coming ridiculous
More tha 108 replies for a very basic question
Or you understand the multiple solutions presented to you, or youshould think re-orienting your carreer
Look at this forum main screen, only a few posts require more than 10 answers, we are ar 108 !!!!
haha I realize this. Trust me, I realize it. -
In Topic: Beginner - Need help getting array to work.
Posted 6 Oct 2011
if I add another ) at the end it cannot find the array.sort(); // sort array on output for(int i = 0; i<length; i++) // loop for output from array // output from array System.out.println("Department Name: " + product[i].displayDept() + " " + "Item name: " + product[i].displayItem() + " " + "Item Number: " + product[i].itemNumber() + " " + "Units Available: " + product[i].unitsAvail() + " " + "Unit Price: $" + product[i].price() + "\n" + "Value of items in stock : $" + product[i].inventValue() + "\n" + "Value of entire inventory : $" + product[i].total_Value() + "\n"); } // end method main public void sort() { Camera temp; for(int i = 0; i<product.length -1; i++) for(int x = 0; x< products.length-1; x++) { if( products[x].displayItem().compareTo(prodcuts[x+1].displayItem() > 0)) { temp = product[x]; product[x].displayItem() = product[x+1].displayItem(); product[x+1].displayItem() = temp; } } } } // end class InventoryProgram
My Information
- Member Title:
- D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Private
|
|


Find Topics
Find Posts
View Reputation Given


|
Comments
fired0g22 has no profile comments yet. Why not say hello?