Beruflich Dokumente
Kultur Dokumente
Machine Problem # 2
Savings Calculator
INSTRUCTION
2. The program will include basic input/output and using Java operators.
OUTPUT
Student Name:
Student Number:
No. of Days/Week:
ALLOWANCE:
EXPENSES
Fare:
Food:
Other:
Expenses:
Total Expenses:
Savings:
FEU Institute of Technology
ITE Department Object Oriented Programming 1 – Machine Problem
Source Code:
import java.util.*;
System.out.println(" I N F O R M A T I O N S Y S T E M ");
System.out.println("========================================");
//declaration of variables
String name;
double allowance,fare,food,otherexpenses,totalexpense;
//Input Output
name = input.nextLine();
number = Integer.parseInt(input.nextLine());
days= Integer.parseInt(input.nextLine());
allowance = Double.parseDouble(input.nextLine());
System.out.println();
System.out.println("========================================");
System.out.println("\t\tEXPENSES ");
fare = Double.parseDouble(input.nextLine());
food = Double.parseDouble(input.nextLine());
otherexpenses = Double.parseDouble(input.nextLine());
double sum;
System.out.println("========================================");
double savings;
}
FEU Institute of Technology
ITE Department Object Oriented Programming 1 – Machine Problem
OUTPUT: