Help with Methods
I am a beginner in Java. I have been learning java by myself during the last few weeks and facing some difficulties with a question i got from a collegue of mine who did java at uni level. I don't know have to work with methods and she can't remember as well. Could some please help me out ??
A telephone cost plan:
Local calls are charged at $0.50 per minute(between 9a.m and 9pm). Long distance calls (> 200 miles) are charged at $1.10 per minute((between 9a.m and 9pm). From 9p.m to 9a.m,calls are charged at half the normal rate.
I have to write a program which calculates the total cost of an arbitrary number of calls. For each call, the person using the phone needs to enter a time value (in 24hr mode), a distance (in miles), and a call length (in minutes). The program must then display the cost of that call and also adds the cost onto a cumulative total.
When the phone user has no more calls to process, a time value of -999 instead of a legal time. When the program reads this sentinel value it displays the total cost of all the processed calls and ends.
Your help would be very appreciated.
Well you'll have to be a little more specific before we can help you. Post what you have so far and let us know specifically which bits you're having trouble with and then we'll be able to help
I agree with Mike. When I was doing Java in college these posts were everywhere. You shouldn't want someone to create a solution for you. Jump into documentation and books and figure it out.
When you think you have or run into specific problems, reply.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center