Results 1 to 8 of 8
- 02-17-2012, 10:53 AM #1
Member
- Join Date
- Feb 2012
- Posts
- 2
- Rep Power
- 0
no idea how to start my assignment
Hi everyone,
this is the assignment I have:
Write a program that takes the price of an article including VAT and prints the
price of the article without VAT. The VAT is currently 19.00%.
Example: Using an input of 119 the output will be:
' Enter the price of an article including VAT: 119
This article will cost 100.00 euro without 19.00% VAT.'
But I have no idea how to start, as I hardly learned any java. I have a couple of assignments similar to this one, so I think that if I have this assignment as a working example, I can also make the other ones.
Thank a lot!!
- 02-17-2012, 11:02 AM #2
Re: no idea how to start my assignment
Trail: Getting Started (The Java™ Tutorials)I have no idea how to start
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 02-17-2012, 11:08 AM #3
Senior Member
- Join Date
- Aug 2011
- Posts
- 248
- Rep Power
- 2
Re: no idea how to start my assignment
Follow the link the db posted and focus on input & output which is the most basic things.
Last edited by tnrh1; 02-17-2012 at 01:01 PM.
- 02-17-2012, 11:24 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Re: no idea how to start my assignment
What on earth does that link have to do with the OPs problem?
- 02-17-2012, 11:29 AM #5
Member
- Join Date
- Feb 2012
- Posts
- 2
- Rep Power
- 0
Re: no idea how to start my assignment
OK, my statement that 'I have no idea how to start' was a bit exaggerated. Actually, this is what I have so far:
import java.io.PrintStream;
import java.util.Scanner;
public class VAT {
static final double Vat = 0.19;
PrintStream out;
Vat() {
out = new PrintStream(System.out);
}
void start() {
Scanner in = new Scanner(System.in);
out.printf("Enter the price of an article including VAT: ");
out.printf("",
}
How do I link the input from entering the price to the output of the price without vat?
- 02-17-2012, 12:10 PM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Re: no idea how to start my assignment
You need to read in what the user has enetered.
You already have the Scanner, and here's the API.
Find the method that does what you need.
- 02-17-2012, 01:01 PM #7
Senior Member
- Join Date
- Aug 2011
- Posts
- 248
- Rep Power
- 2
- 02-17-2012, 02:03 PM #8
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Similar Threads
-
No idea where to start
By dhazwa in forum New To JavaReplies: 2Last Post: 08-19-2011, 10:10 AM -
help me start with idea: few basic questions.
By alfonz19 in forum IntelliJ IDEAReplies: 2Last Post: 05-30-2011, 05:58 PM -
Start Swing GUI program by Java Web Start with IE in Eclipse debug mode
By albertkao in forum EclipseReplies: 1Last Post: 01-18-2011, 06:27 PM -
How do you start a Java program from the "Start" menu under Windows?
By ScottVal in forum New To JavaReplies: 5Last Post: 03-20-2009, 10:04 PM -
anyone can give idea 2 my assignment?
By chen8735 in forum Advanced JavaReplies: 2Last Post: 03-08-2008, 06:03 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks