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: 304 Weeks Ago, 5 Days 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 08 Nov 2017 My Price 10.00

Here is the next project. Can you please help me again on this one?

Hi its me again. Here is the next project. Can you please help me again on this one? You will have to modify the previous calc that is attached. Also please read the revision text first and apply those. Then read the pdf for instructions. Thanks.


  • import java.util.Scanner;


    public class BACcalculator {
         public static void main(String[] args) {

            // Defines constants for each item      
           
            final double MALE_META_RATE = 0.015;
            final double FEMALE_META_RATE = 0.014;

            // Calls method 1 (reads description to user)
            description();
            Drinker drinker = new Drinker();

            // Begins prompting user for input
            Scanner input = new Scanner(System.in);
            System.out.print("Enter the drinker’s last name: ");
            String lastName= input.nextLine();
            System.out.print("Enter the drinker’s phone number: ");
            String phoneNumber= input.nextLine();
            drinker.setIdentifier(lastName, phoneNumber);
            System.out.print("Enter drinker's height (in inches): ");
            int heightInches = input.nextInt();
            drinker.setHeight(heightInches);
            System.out.print("Enter the drinker's weight (in pounds): ");
            int weightPounds = input.nextInt();
            drinker.setWeight(weightPounds);
           
            drinker.setNoOfDrinksConsumed();
            drinker.setElapsedTime();



            // Storing return values from methods 2 & 3
            double maleVAD = drinker.maleVAD();
            double femaleVAD = drinker.femaleVAD();
           
            getResults(drinker,heightInches,weightPounds);
           
            drinker.BAC(maleVAD, MALE_META_RATE, "male");
            drinker.BAC(femaleVAD, FEMALE_META_RATE, "female");

        }

        /**
         * Method 1 - This method will display a description to the reader of what
         * the program will do
         */
        public static void description() {
            System.out.println("This program implements a Blood Alcohol Conent "
                    + "(BAC) Calculator\n");
            System.out.println("Given a drinker's weight and height, and the number"
                    + " of drinks \nconsumed over how many hours, it will compute"
                    + " the person's \napproximate current blood alcohol content\n");
        }

       

        /**
         * Method 5 - This method will display all results
         *
         * @param drinker the drinker object
         * @param height the height in inches of drinker
         * @param weight the weight in pounds of the drinker
         */
        public static void getResults(Drinker drinker, int height,int weight) {

            // Begins output of results
            System.out.println("\ncalculations for Drinker " +drinker.getIdentifier()+" ,");
            System.out.printf("who is %d inches tall and weighs %d pounds.\n",height, weight);
            System.out.println("\nAfter drinking " + drinker.getNoOfDrinksConsumed() + " drinks, "
                    + "in " + drinker.getElapsedTime() + " hours:");
           

        }
    }

Attachments:

Answers

(5)
Status NEW Posted 08 Nov 2017 12: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)