From e57efbffe26c1b92070954bf7e9e5330d1fef322 Mon Sep 17 00:00:00 2001 From: Adam Carnicle-Maile Date: Mon, 14 Aug 2023 14:43:04 -0500 Subject: [PATCH] Syl's commit that is really good --- .idea/misc.xml | 2 +- src/main/java/Main.java | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 0a13117..9bae292 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -8,7 +8,7 @@ - + \ No newline at end of file diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 13d24d6..e4ee508 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -1,16 +1,25 @@ +// Need comment at the top of the program. + +// Changes made: Condensed some code, changed most println to just print +// Nothing changed in Data.java +// - Syl import java.util.Scanner; public class Main { static Scanner input = new Scanner(System.in); public static void main(String[] args) { - System.out.println("Enter the download size: "); + System.out.print("Enter the download size: "); double dataAmount = Double.parseDouble(input.nextLine()); - - System.out.println("Enter the measurement on the download"); - System.out.println("(bytes, kilobytes, megabytes, gigabytes): "); + /* + Instead of doing this: + System.out.println("Enter the measurement on the download"); + System.out.println("(bytes, kilobytes, megabytes, gigabytes): "); + Do this: + */ + System.out.print("Enter the measurement of the download\n(bytes, kilobytes, megabytes, gigabytes): "); String unit = input.nextLine(); - System.out.println("Enter your download speed (Megabits/sec): "); + System.out.print("Enter your download speed (Megabits/sec): "); int speed = Integer.parseInt(input.nextLine()); //Build a Data object with these three values