• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Switch Prog. ,Now In Arrays..???

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi experts, can you please help me in this program...

this program is to display the menu card and lets the user select the options he wants....it also calculates how much the total transaction is, but my doubt is....can i write the same program using arrays...am trying this program only in java console....and also no applets also...just Arrays....please help me with the code...

Code Using Switch Cases....

 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Sure you can write the program using arrays. If you don't know how arrays work in Java, then have a look at the Arrays lesson in Sun's Java Tutorial.

The program above is not an applet, it's a standalone program. So there's nothing with applets there that you'll have to remove.
 
reply
    Bookmark Topic Watch Topic
  • New Topic