Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Hi all, i'm new to java programmin. can u guys assist me with my program?

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Hi all, i'm new to java programmin. can u guys assist me with my program?

    Hey guys, this is the question.....
    One large chemical company sells its chemical equipment at the following rates:
    Equipment Code Description Price
    RQ1 Reactor 0.5KL GMP $1500
    RQ2 Reactor 20 KL Non GMP $3000
    The company pays its salespeople on a commission basis. The salespersons receive the basic pay of $ 2000 per
    month plus a percentage of their gross sales for that month as follows.
    Total number of units Sold (RQ1+RQ2) Percentage commission
    1 to50 9%
    51 to 100 18%
    Above 100 25%
    The company also has a savings plan for the sales persons. The salespersons have a choice to invest their
    commission in the plan. If a person invests in a savings plan, it yields 8 percent interest. Assuming that all interest is
    left on deposit in the savings plan account, calculate and print the amount of money in the savings plan account at
    the end of each year for 5 years. Use the following formula to determine these amounts:
    a=p(1+r)^n
    where,
    p is the original amount invested,
    r is the annual interest rate,
    n is the number of years,
    a is the amount on deposit at the end of the nth year.
    Write a program that takes as input the number of units of each type sold by the sales persons and calculates the
    commission. The program also gives the option to input the sales person’s desire to invest in the savings plan. The
    program should calculate and display the total sales amount, the commission and amount accumulated in the
    savings plan after 5 years. The program should interact with the user as follows.
    Use scanner object to take inputs and displays the output using system.out.println ()

    --- Update ---

    Quote Originally Posted by jessica214 View Post
    Hey guys, this is the question.....
    One large chemical company sells its chemical equipment at the following rates:
    Equipment Code Description Price
    RQ1 Reactor 0.5KL GMP $1500
    RQ2 Reactor 20 KL Non GMP $3000
    The company pays its salespeople on a commission basis. The salespersons receive the basic pay of $ 2000 per
    month plus a percentage of their gross sales for that month as follows.
    Total number of units Sold (RQ1+RQ2) Percentage commission
    1 to50 9%
    51 to 100 18%
    Above 100 25%
    The company also has a savings plan for the sales persons. The salespersons have a choice to invest their
    commission in the plan. If a person invests in a savings plan, it yields 8 percent interest. Assuming that all interest is
    left on deposit in the savings plan account, calculate and print the amount of money in the savings plan account at
    the end of each year for 5 years. Use the following formula to determine these amounts:
    a=p(1+r)^n
    where,
    p is the original amount invested,
    r is the annual interest rate,
    n is the number of years,
    a is the amount on deposit at the end of the nth year.
    Write a program that takes as input the number of units of each type sold by the sales persons and calculates the
    commission. The program also gives the option to input the sales person’s desire to invest in the savings plan. The
    program should calculate and display the total sales amount, the commission and amount accumulated in the
    savings plan after 5 years. The program should interact with the user as follows.
    Use scanner object to take inputs and displays the output using system.out.println ()



    This is what i did..i kinda did the test and everything in one..

    public class Commissions
    {
    public static int Main()

    {
    int rq1=20;
    int rq2=15;
    double p;
    double r;
    double n;
    double a;
    double basic = 2000;
    double rq1price = 1500;
    double rq2price = 3000;
    double commission;
    double totalsoldprice;
    double planYear;
    char invest;
    String Id;

    System.out.print("Enter Sales Id");

    System.out.print("Enter number of RQ1 units sold");

    System.out.print("Enter number of RQ2 units sold");


    totalsoldprice = (rq1 * rq1price) + (rq2 * rq2price);
    if ((rq1 + rq2) <= 50)
    commission = totalsoldprice * 9 / 100;
    if ((rq1 + rq2) > 50 && (rq1 + rq2) <= 100)
    commission = totalsoldprice * 18 / 100;
    if ((rq1 + rq2) > 100)
    commission = totalsoldprice * 25 / 100;
    System.out.print("\nInvest the commission in savings plan ? (Y=Yes, N=No) ");

    if (invest == 'Y' || invest == 'y')
    {

    System.out.print(" Total gross sales amount ");
    System.out.print(totalsoldprice);
    System.out.print("\n");
    System.out.print(" Commission earned ");
    System.out.print(commission);
    System.out.print("\n");
    System.out.print(" Total salary ");
    System.out.print(basic + commission);
    System.out.print("\n");
    }

    {
    p = commission * ((1.08));

    System.out.print("The Commission savings plan earning after 1 years=");
    System.out.print(p);

    }

    {
    p = commission * ((1.08) * (1.08));

    System.out.print("The Commission savings plan earning after 2 years=");
    System.out.print(p);

    }

    {
    p = commission * ((1.08) * (1.08) * (1.08));

    System.out.print("The Commission savings plan earning after 3 years=");
    System.out.print(p);

    }

    {
    p = commission * ((1.08) * (1.08) * (1.08) * (1.08));

    System.out.print("The Commission savings plan earning after 4 years=");
    System.out.print(p);

    }

    {
    p = commission * ((1.08) * (1.08) * (1.08) * (1.08) * (1.08));

    System.out.print("The Commission savings plan earning after 5 years=");
    System.out.print(p);

    }



    }
    }


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Hi all, i'm new to java programmin. can u guys assist me with my program?

    Please explain what your problem is.

    Please edit your post and wrap your code with
    [code=java]
    <YOUR CODE HERE>
    [/code]
    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Feb 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Hi all, i'm new to java programmin. can u guys assist me with my program?

    i am supposed to do a three class program ...however, i am having problems starting it. i honestly don't knoiw anything about programming. i'm a newbie to java...can u please please assist me..thanks a lot

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Hi all, i'm new to java programmin. can u guys assist me with my program?

    What is supposed to go in each of the classes?

    Please edit your post and wrap your code with
    [code=java]
    <YOUR CODE HERE>
    [/code]
    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Member
    Join Date
    Sep 2012
    Posts
    128
    Thanks
    1
    Thanked 14 Times in 14 Posts

    Default Re: Hi all, i'm new to java programmin. can u guys assist me with my program?

    If you're wondering which part of your program to break up into classes, just check what code gets repeated.

Similar Threads

  1. Please assist, issues with a JDBC connection
    By gmetz in forum JDBC & Databases
    Replies: 3
    Last Post: December 19th, 2012, 04:34 AM
  2. Replies: 1
    Last Post: July 6th, 2011, 09:27 AM
  3. can u guys help me fix my program
    By nima9006 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 14th, 2010, 03:43 AM
  4. Replies: 5
    Last Post: December 13th, 2009, 07:10 PM