SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 314 Weeks Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 19 Nov 2017 My Price 10.00

payroll program that requests the users name,

I am currently working on a java program and I'm having trouble figuring out what I am doing wrong. The question asks for payroll program that requests the users name, hours worked, rate of pay and outputs gross pay. It will also take out state and federal taxes to eventually give you your net pay. It needs to be written mostly with Methods. I believe I have the method for name, hours and rate created correctly but I haven't been able to get the gross pay to run correctly.Any point in the right direction would be helpful. thanks attached is the code I have written so far.

/**
 * Created by mobius_544 on 6/22/17.
 */

/**************************************************************************
 Class:CS 1301
 Section: 05
 Term: Summer 2017
 Name: Matthew Cornwell
 Instructor: Mr. B
 *******************************************************************************/
import java.util.Scanner;

public class Payroll
{
    public static void main(String[] argv)
    {
        System.out.println("Payroll");
        System.out.println("");
        String n = name();
        double hours = hours();
        double rate = rate();
        double  gross = grossPay(hours, rate);
        double ftax = fedTax();
        double stax = stateTax();

    }//End of main method

    private static double grossPay(double rate, double hours) {
        System.out.print("Gross Pay: " + grossPay(rate, hours));
        double gross = rate * hours;
        return gross;
    }

    private static double stateTax() {

        return 0;
    }

    private static double fedTax() {
        return 0;
    }

    private static double rate()
    {
        Scanner input = new Scanner(System.in);
        System.out.print("Pay rate: ");
        double rate = input.nextDouble();
        return rate;
    }

    private static double hours()
    {
        Scanner input = new Scanner(System.in);
        System.out.print("Hours Worked: ");
        double hours = input.nextDouble();
        return hours;
    }

    private static String name()
    {
        Scanner input = new Scanner(System.in);
        System.out.print("Employee Name: ");
        String n = input.nextLine();
        return n;
    }
}//End of class

Answers

(5)
Status NEW Posted 19 Nov 2017 01:11 PM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)