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
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"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,
Expand Down
7 changes: 7 additions & 0 deletions _01_02b/Employee.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,24 @@ 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.



// Print the yearsOfService variable to the console.

// Create a variable called baseSalary of type int and assign it the value 3000.
Expand Down
11 changes: 11 additions & 0 deletions _01_02e/Employee.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,36 @@ public static void main(String[] args) {

// 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;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unwanted lines 32,33,21,17,37,40,46,50.


// 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.
System.out.println(firstBonus + secondBonus + thirdBonus);

}

Expand Down
13 changes: 12 additions & 1 deletion _01_04/MenuBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,37 @@ public static void main(String[] args) {

// Create a variable called menuTitle of type String and assign it the value "My
// Dream Menu:".

String menuTitle = "My Dream Menu";
// Print the menuTitle variable to the console.
System.out.println(menuTitle);

// Create a variable called menu of type ArrayList.
ArrayList<MenuItem> menu = new ArrayList<>();

// Create a variable called starter of type MenuItem and pass in the name of
// your favourite starter.

MenuItem starter = new MenuItem("Calamari");

// Add the starter variable to the ArrayList called menu.
menu.add(starter);

// Create a variable called mainCourse of type MenuItem and pass in the name of
// your favourite main course.
MenuItem mainCourse = new MenuItem("Lasagne");

// Add the mainCourse variable to the ArrayList called menu.

menu.add(mainCourse);

// Create a variable called dessert of type MenuItem and pass in the name of
// your favourite dessert.

MenuItem dessert = new MenuItem("Banoffee pie");
// Add the dessert variable to the ArrayList called menu.
menu.add(dessert);

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