Go Back   Java Programming Forums > Java Standard Edition Programming Help > Java Theory & Questions


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 22-09-2009, 02:54 AM
Junior Member
 

Join Date: Sep 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
abielm_007 is on a distinguished road
Default Help with CoinCounter method

I was working with Dr. Java on my class assignment while the professor solved some of the first questions. Not sure how, but i deleted all of my CoinCounterTest (the assignment) and wasn't able to retrieve it. Now I'm lost and need someone to explain how to solve some of the questions on the assignment starting with the first one. I can work my way through some of the steps, but im confused on the first 2

Part 1: In your test program do the following:

1. Write client code (in the CoinCounterTest.java file) to create a CoinCounter object called counter.

2. Write client code to call the print method of counter.

3. Write client code to deposit 7 quarters, 3 dimes, 10 nickels, and 17 pennies in counter. Output the new status of counter using the toString method.

4. Write client code to put the value of the coins deposited so far into a double variable called totalValue. Then print totalValue with an identifying label.

5. Write client code to deposit an additional 11 quarters, 8 dimes, 0 nickels, and 100 pennies in counter. Again find out and print the value of the total deposits.

6. Write client code to create an additional CoinCounter object called bankCounter. Make deposits of 30 quarters, 90 dimes, 100 nickels, and 1000 pennies to bankCounter.

7. Write client code to print bankCounter using the print method.

8. Write client code to clear bankCounter and print bankCounter using the toString method.
Attached Files
File Type: zip CoinCounter.zip (1.6 KB, 1 views)



Reply With Quote Share this thread on Facebook
Sponsored Links
Java Training from DevelopIntelligence
  #2 (permalink)  
Old 22-09-2009, 03:03 AM
Junior Member
 

Join Date: Sep 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
abielm_007 is on a distinguished road
Default Re: Help with CoinCounter method

attatched are the files needed to write the code:

CoinCounter.java
CoinCounterTest
and the Project CoinCounter
Reply With Quote
  #3 (permalink)  
Old 03-01-2010, 05:19 PM
JavaPF's Avatar
mmm.. coffee
 
7 Highscores

Join Date: May 2008
Location: United Kingdom
Posts: 1,581
Thanks: 103
Thanked 93 Times in 86 Posts
JavaPF is someone you want to know!JavaPF is someone you want to know!JavaPF is someone you want to know!

I'm feeling Stressed
Default Re: Help with CoinCounter method

What Is an Object? (The Java™ Tutorials > Learning the Java Language > Object-Oriented Programming Concepts)

Please post some of the code you have written and we can take it from there..
__________________
Don't forget to add syntax highlighted code tags around your code: [highlight=Java] code here [/highlight]

Forum Tip: Add to peoples reputation () by clicking the button on their useful posts.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any way to map method calls? Swiftslide Collections and Generics 1 21-09-2009 09:37 AM
dynamic method problem... Ranger-Man Object Oriented Programming 8 07-09-2009 09:22 PM
[SOLVED] Declare a method mohsendeveloper Object Oriented Programming 4 11-06-2009 08:18 AM
[SOLVED] CoinCounter with scanner class. coccoster File I/O & Other I/O Streams 6 25-03-2009 12:46 PM
matches() method is not available in Jbuilder4 sah Java IDEs 1 30-12-2008 11:30 AM


100 most searched terms
Search Cloud
2d arraylist java actionlistener actionlistener in java actionlistener java addactionlistener addactionlistener in java addactionlistener java applications of oops could not create java virtual machine xp double format java double to int double to int java double to integer in java double to integer java eclipse shortcut keys eclipse tutorial for beginners exception in thread "awt-eventqueue-0" java.lang.outofmemoryerror: java heap space exception in thread "main" java.lang.nullpointerexception exception in thread "main" java.lang.outofmemoryerror: java heap space format double java get mouse position java java 2d arraylist java actionlistener java addactionlistener java convert list to map java double format java double formatting java double to int java double to integer java format double java forum java forums java get mouse position java list to map java mouse position java programming forum java programming forums java programming help java sendkeys java two dimensional arraylist java.lang.classformaterror: truncated class file java.lang.outofmemoryerror: java heap space java.util.arraylist jbutton actionlistener jtextarea font jtextfield font size jxl.read.biff.biffexception: unable to recognize ole stream programming mutators and generics two dimensional arraylist java writing ipod apps

All times are GMT. The time now is 06:54 AM.
Powered by vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.