Results 1 to 8 of 8
  1. #1
    sysadmin is offline Member
    Join Date
    Feb 2012
    Posts
    2
    Rep Power
    0

    Default 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!!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: no idea how to start my assignment

    I have no idea how to start
    Trail: Getting Started (The Java™ Tutorials)

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    tnrh1 is offline Senior Member
    Join Date
    Aug 2011
    Posts
    251
    Rep Power
    4

    Default 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.

  4. #4
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,931
    Rep Power
    19

    Default Re: no idea how to start my assignment

    What on earth does that link have to do with the OPs problem?

  5. #5
    sysadmin is offline Member
    Join Date
    Feb 2012
    Posts
    2
    Rep Power
    0

    Default 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?

  6. #6
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,931
    Rep Power
    19

    Default 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.

  7. #7
    tnrh1 is offline Senior Member
    Join Date
    Aug 2011
    Posts
    251
    Rep Power
    4

    Default Re: no idea how to start my assignment

    Quote Originally Posted by Tolls View Post
    What on earth does that link have to do with the OPs problem?
    lol I confused between this thread to the "a newbie java question" thread.

  8. #8
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,931
    Rep Power
    19

    Default Re: no idea how to start my assignment

    Oh right.
    I thought you'd gone mad!

Similar Threads

  1. No idea where to start
    By dhazwa in forum New To Java
    Replies: 2
    Last Post: 08-19-2011, 10:10 AM
  2. help me start with idea: few basic questions.
    By alfonz19 in forum IntelliJ IDEA
    Replies: 2
    Last Post: 05-30-2011, 05:58 PM
  3. Replies: 1
    Last Post: 01-18-2011, 06:27 PM
  4. Replies: 5
    Last Post: 03-20-2009, 10:04 PM
  5. anyone can give idea 2 my assignment?
    By chen8735 in forum Advanced Java
    Replies: 2
    Last Post: 03-08-2008, 06:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •