Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 14 additions & 5 deletions src/main/java/Main.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down