Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners would you please help me?
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


john
would you please help me?
0 Answer(s)      3 years and a month ago
Posted in : Java Beginners


Write a class Amount which stores sums of money given in pounds and pence. Your con- structor should take two ints, for pounds and pence seperately. The class should also provide methods to add and withdraw money, again in pounds and pence, and a toString method that returns the balance in the format ?£X.XX?, ?£XX.XX?, ?£XXX.XX?, and so on, as appropriate. If a withdrawal would make the balance less than zero, your class should print an error message to the screen and ignore the withdrawal.


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Advertisements
Advertisements
 

 

 

DMCA.com