Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first task compete #4

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
"files.autoSave": "afterDelay",
"screencastMode.onlyKeyboardShortcuts": true,
"terminal.integrated.fontSize": 18,
"workbench.activityBar.visible": true,
"workbench.colorTheme": "Visual Studio Dark",
"workbench.fontAliasing": "antialiased",
"workbench.statusBar.visible": true,
"java.server.launchMode": "Standard"
}
}
Binary file added _01_02b/Employee.class
Binary file not shown.
13 changes: 13 additions & 0 deletions _01_02b/Employee.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,48 @@ public class Employee {
public static void main(String[] args) {

// Create a variable called age of type int and assign it the value 29.
int age = 29;

// Print the age variable to the console.
System.out.println(age);

// Create a variable called isAManager of type boolean and assign it the value
// true.
boolean isAManager = true;

// Print the isAManager variable to the console.
System.out.println(isAManager);

// Create a variable called yearsOfService of type double and assign it the
// value 2.5.
double yearsOfService = 2.5;

// Print the yearsOfService variable to the console.
System.out.println(yearsOfService);

// Create a variable called baseSalary of type int and assign it the value 3000.
int baseSalary = 3000;

// Create a variable called overtimePayment of type int and assign it the value
// 40.
int overtimePayment = 40;

// Create a variable called totalPayment of type int and assign it to the value
// of baseSalary added to overtimePayment.
int totalPayment = baseSalary + overtimePayment;

// Print the totalPayment variable to the console.
System.out.println(totalPayment);

// Create three variables all of type double on a single line.
// They should be called firstBonus, secondBonus and thirdBonus and they should
// be assigned the values 10.00, 22.00 and 35.00.
double firstBonus = 10.00 , secondBonus= 22.00, thirdBonus = 35.00;

// Print out the sum of the variables called firstBonus, secondBonus and
// thirdBonus.
double sum = firstBonus+secondBonus+thirdBonus;
System.out.println(sum);

}

Expand Down