![]() |
|
#1
|
|||
|
|||
Imitate a cash register transactionHi I've been reading around the forums and I've decided to join. I'm a new student in computing and I was wondering if someone could help me out.
Create a Java application project called Exercise1b that imitates a cash register transaction. You should enter the price of the item at the keyboard, calculate the gst (5%) on that price, calculate the total amount due, get the amount tendered from the keyboard, calculate the change due and print out all the results with two decimal places. The output should look like the following (note that user input is in bold type): Use the following code to input the price and the amount tendered: JAVA Code:
Please enter the item price>4.98 Price: 4.98 GST: 0.25 Total: 5.23 Please enter the amount tendered>6.25 Tender: 6.25 Change due: 1.02 How would I write that out? Last edited by LuciWiz : 24-Sep-2008 at 09:38.
Reason: Please insert your Java code between [java] & [/java] tags
|
|||
|
#2
|
||||
|
||||
Re: Question with CodingSenior members might not reply to this thread if you:
We encourage you to post again once you've done that. __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#3
|
||||
|
||||
Re: Question with CodingShow us what you tried.
__________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#4
|
|||
|
|||
Re: Question with Coding# You must use Float objects and float primitive data types to complete this exercise.
# See Floats and floats for more details # Convert Float from readFloat() to float value to do any math operation, for example: JAVA Code:
# You can convert the float value, fItemPrice into a float value with two decimal places using the expression: JAVA Code:
Those are the guidelines that I am supposed to follow. The thing is, I'm really new at this and I was wondering how I would start this code? I'm not sure how I would calculate the GST and the others. Last edited by LuciWiz : 25-Sep-2008 at 00:24.
Reason: Please insert your Java code between [java] & [/java] tags
|
|
#5
|
|||
|
|||
Re: Imitate a cash register transactionI also use eclipse to write these codes if that helps.
|
Recent GIDBlog
Not selected for officer school by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Please, This is Difficult question try for me! | bcompt143 | C++ Forum | 4 | 24-Aug-2008 09:14 |
| Question about locking surfaces to directly access pixels, SDL. | george89 | C++ Forum | 0 | 18-Jun-2006 21:16 |
| Coding Contest #1 | davis | Miscellaneous Programming Forum | 0 | 12-Jun-2006 08:29 |
| Pls help in this coding. | harsha | C++ Forum | 5 | 08-Apr-2004 20:48 |
| C Coding Style | dsmith | Miscellaneous Programming Forum | 10 | 24-Feb-2004 06:23 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The