[nbusers] need one class to run another one??

  • From: "bolsover" < >
  • To:
  • Subject: [nbusers] need one class to run another one??
  • Date: Wed, 21 Nov 2012 07:56:51 -0500

why even both with two classes?...


Code:
/*

package annual;

import java.util.*;

public class Annual {

    private void runfirst() {
        double T = 50000;
        double Amt;
        Scanner percent = new Scanner(System.in);
        System.out.println("Please enter annual sales");
        System.out.println("please enter a numeric value to avoid program 
crash:");
        double yearly = percent.nextDouble();
        if (yearly >= 0 && yearly <= 20000000) {
            double YrPrcnt = yearly * .05;
            Amt = T + YrPrcnt;
            System.out.print("The Annual Payrate for employee is:");
            System.out.print(Amt);
        } else {
            System.err.println("Sales too high");
            System.err.print("Please see Human Resources.");
        }
    }

    private void runsecond() {
        //Base salary is $50,000 annually....        
        System.out.println("Salesperson regular wages = $50,000");
        // 80% of sales target is computed 
        // Target = 100000 * 80%. 
        System.out.println("$100,000 * 80% = $80,000");
        // Return 5% commission of sales target 
        // commission = 5% * $100,000; 
        System.out.println("100,000 * 5% = $5000");
        // Return commission with acceleration factor 
        // Commission = 5% + 1.25 acceleration factor; 
        System.out.println("5% + 1.25 = 6.25%");
        // Return potential. 
        // Sales with 5% interest increment at 1.25 acceleration 
        // factor until annual sales reach 50% of salesperson annaul sales 
        // total sales = 50% + 6.25%; 
        System.out.println("50% + 6.25% = 56.25% ");
        // Calculate potential compensation = 100,000 / 56.25%; 
        System.out.println("$100,000 / 56.25% = $56,250");
        // Calculate potential compensation by sales; 
        // Return potential payrates with commissions; 
        System.out.println("$100,000 * 5% = $5,000");
        System.out.println("$100,000 + $5,000 = Total Sales $105,000");
        System.out.println("$105,000 / 56.25% = $56,562.50");
        System.out.println("$110,000 / 56.25% = $61,875");
        System.out.println("$115,000 / 56.25% = $64,687.50");
        System.out.println("$120,000 / 56.25% = $67,500");
        System.out.println("$125,000 / 56.25% = $70,312.50");
        System.out.println("$130,000 / 56.25% = $73,125");
        System.out.println("$135,000 / 56.25% = $75,937.50");
        System.out.println("$140,000 / 56.25% = $78,750");
        System.out.println("$145,000 / 56.25% = $81,562.50");
        System.out.println("$150,000 / 56.25% = $84,375");
    }

    public static void main(String[] args) {
        Annual annual = new Annual();
        annual.runfirst();
        annual.runsecond();
    }
}








[nbusers] need one class to run another one??

zlloyd1 11/19/2012

[nbusers] need one class to run another one??

bolsover 11/21/2012

[nbusers] need one class to run another one??

zlloyd1 11/22/2012

[nbusers] need one class to run another one??

bolsover 11/22/2012

[nbusers] need one class to run another one??

zlloyd1 11/22/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close