File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Shopping Cart Using Arrays..suggestions please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Shopping Cart Using Arrays..suggestions please" Watch "Shopping Cart Using Arrays..suggestions please" New topic
Author

Shopping Cart Using Arrays..suggestions please

Shank Ragz
Greenhorn

Joined: Jul 09, 2008
Posts: 5
Hi all,

iam new to java....I just thought if i can create a shopping cart using java arrays.

i want to make it such a way that i should have three options in menu n' three more in sub menu's of each item....for every choice selected it should prompt me with the do you want to go back to the previous menu or want to exit...how to make this happen...

can i make three calsses for each menu n' put the functionality of these three in those classes..?? is it possible to call three calsses when ever a call is made to them..??

please suggest me on this....

waiting for your suggestions...

thnx in advance
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2718
    
    6

Hi Shank Ragz welcome to Javaranch
can i make three calsses for each menu n' put the functionality of these three in those classes..?? is it possible to call three calsses when ever a call is made to them..??


You dont call classes, you call methods belonging to them. And you can call them.

And please UseRealWords menu n' put n', thnx are not real words.

And please take some time to read the ask good questions link below.



Hope this helps .


SCJP, SCWCD.
|Asking Good Questions|
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40034
    
  28
Difficult to be certain, but it sounds more as if you need three objects of the same class for your menus, each with a different array of products in.
Bill Shirley
Ranch Hand

Joined: Nov 08, 2007
Posts: 457
avoid arrays (when possible, or until you know more)

Java Collections Framework Introduction


Bill Shirley - bshirley - frazerbilt.com
if (Posts < 30) you.read( JavaRanchFAQ);
Shank Ragz
Greenhorn

Joined: Jul 09, 2008
Posts: 5
Originally posted by Amit Ghorpade:
Hi Shank Ragz welcome to Javaranch


You dont call classes, you call methods belonging to them. And you can call them.

And please UseRealWords menu n' put n', thnx are not real words.

And please take some time to read the ask good questions link below.



Hope this helps .


well brother, i dont'know about the real questions but the forum is all about Java and guess am asking the damn real questions in a very damn correct manner and forum...

anywayz, thanks for asking me to spend more time in typing than thinking about the subject

Cheers....
Shank Ragz
Greenhorn

Joined: Jul 09, 2008
Posts: 5
Originally posted by Campbell Ritchie:
Difficult to be certain, but it sounds more as if you need three objects of the same class for your menus, each with a different array of products in.


yeah man...but i need to finish it in time....only using arrays....
Shank Ragz
Greenhorn

Joined: Jul 09, 2008
Posts: 5
Originally posted by Bill Shirley:
avoid arrays (when possible, or until you know more)

Java Collections Framework Introduction


Wish i had the opportunity to use arrayList and more but am restricted to use only single, double n' multidimentional arrays mate...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Shopping Cart Using Arrays..suggestions please