/* * InsulinDosage.java * * This program computes the dosage of insulin that a person should * take before a meal, based on the person's current blood sugar, * their target blood sugar, the amount of exercise they have performed * recently, and two characteristics of the meal they are about to consume. * * CS 112 Course Staff (cs112-staff@cs.bu.edu) * * completed by: your name and email * partner (if any): */ import java.util.*; public class InsulinDosage { public static void main(String[] args) { // Create a Scanner that can read from the console. Scanner scan = new Scanner(System.in); /* * TO DO: replace each of the 0s below with a method * call that gets an integer from the user. * You MUST use the Scanner object created above * at the start of main. You may NOT construct an * additional Scanner object. */ System.out.print("current blood sugar: "); int currentSugar = 0; System.out.print("target blood sugar: "); int targetSugar = 0; System.out.print("carbohydrate equivalency: "); int carbEquiv = 0; System.out.print("carbohydrates to consume: "); int carbConsume = 0; System.out.print("amount of exercise (0-3): "); int exercise = 0; /* * TO DO: complete the rest of the program below. */ // Leave this line unchanged. scan.close(); } }