Question: ////++++on this certain program, there is already code that cant be changed, it just needs code to be added basically need code for main program

////++++on this certain program, there is already code that cant be changed, it just needs code to be added////++++on this certain program, there is already code that cant be changed,it just needs code to be added basically need code for main

program code in text import java.util.*; public class Sizes { public staticScanner kbd; public static void main(String[] args) { kbd = new Scanner(System.in);} public static double hatSize(double weight, double height) { double ans; ans

basically need code for main program

code in text

import java.util.*;

public class Sizes {

public static Scanner kbd;

public static void main(String[] args) {

kbd = new Scanner(System.in);

}

public static double hatSize(double weight, double height) {

double ans;

ans = (weight/height) *2.9;

return ans;

}

public static double jacketSize(int weight, int height, int age) {//Three parameters returning to jacketsize

double mul = weight*height;

mul = mul/288;//calculations to get jacket size

while(age >= 40) {//startin at he age of 40

mul = mul + 1.0/8.0;

age = age - 10;//adjusted 1/8 of inch for every 10 years

}

return mul;

}

public static double waistSize( int weight, int age ) {/

double answer= weight/5.7;

while(age>=30) {

answer=answer + 1.0/10.0;

age=age - 2;

}

return answer;

}

public static int menu() {

while (true) {

System.out.println();

System.out.println("1. Calculate Hat Size");

System.out.println("2. Calculate Jacket Size");

System.out.println("3. Calculate Waist Size");

System.out.println("4. No More Calculations");

System.out.print(" Enter your choice: ");

// read user input

int n = kbd.nextInt();

if (n >= 1 && n

return n;

}

kbd.close();

}

}

}

import java.util. public class Sizes [ public static Scanner kbd; public static void main(String[] args) kbd new Scanner (System.in); public static double hatSize (double weight, double height) double ans; ans (weight/height) 2.9 return ans public static double jacketSize (int weight, int height, int age)//Three parameters returning to jacketsize double mulweight*height; mul mul/288;//calculations to get jacket size while(age >. 49) {//startin at he age of 40 mulmul+1.0/8.0 age age 10;//adjusted 1/8 of inch for every 10 years return mul; public static double waistSize int weight, int age) double answer weight/5.7; while (age>-30) answer-answer +1.0/10.0 age-age - 2; return

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!