jQuery in Action, 3rd edition
The moose likes Beginning Java and the fly likes help needed with questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "help needed with questions" Watch "help needed with questions" New topic

help needed with questions

tony edward

Joined: Aug 19, 2004
Posts: 1
could someone please help me with these 3 exam questions

it would mean a lot to me.

Question 1:
The ALL-IN-ONE STORE needs to increase the price of all items by 7,5%. Prompt the user to enter the item number and also to enter the item current price. Calculate the new price and display the item number and the new price. Example:
Enter the item number:
Enter the item price:
Item number = 89VF34
New item price = 26.1655

Question 2:
Write a Java application that prompt the user to enter the price of fuel per liter, the distance in kilometers traveled and the distance the car travels per liter. Calculate and display the cost of the fuel for the distance traveled. Example:
Enter the price of fuel per liter:
Enter the distance in km traveled:
Enter the distance the car travels per liter:
The cost of fuel for the distance traveled = R15.6115384

Question 3:
Write a Java application that prompts the user to enter John�s gross monthly salary. The pension fund contribution is 8% of his salary. The tax takes 20% of his taxable salary (gross salary � pension) and he pays R425 for medical aid. Display his gross salary, total deductions and net salary.
Junilu Lacar

Joined: Feb 26, 2001
Posts: 6529

If you have any specific questions regarding the programs that you are writing to solve these, we'd be glad to help. Apart from that, we're usually not in the habit of doing people's homework for them. Sorry.

Junilu - [How to Ask Questions] [How to Answer Questions]
celine mcgowan
Ranch Hand

Joined: Nov 22, 2003
Posts: 36
Hi Tony,

Junilu is right - no-one will do your homework for you. But don't be too disappointed - it's a ploy they have here to make you learn Java!!! Anywho, the problems you have are simple enough - as long as you know where to start...

So, go to your local library (or maybe look at your Java course notes!) and find out how to write a very simple class in Java. Then find out how to do maths in Java. Once the maths is finished, most of your work is done. Just one more step - you'll need to know how to get input from the user & how to return output to the user. Any good java book or set of notes will cover these topics in the first couple of chapters/sections.

Build what you do up slowly but surely & you'll be amazed how quickly you get there. If you get stuck the people here are really, really helpful so post any questions you like!!!

Good luck with it!

We've heard that a million monkeys at a million keyboards would eventually reproduce the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true.<br />- Robert Wilensky
Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
You said that these were exam questions.

The teachers must be pretty liberal down there (you do realize that they read this board too).

Mike Gershman
SCJP 1.4, SCWCD in process
I agree. Here's the link: http://aspose.com/file-tools
subject: help needed with questions
It's not a secret anymore!