-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cad119c
commit d90d7c1
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,28 @@ | ||
package app; | ||
|
||
import java.util.GregorianCalendar; | ||
|
||
import administration.*; | ||
import hr.Student; | ||
import inventory.*; | ||
|
||
public class App { | ||
public static void main(String[] args) { | ||
// Make the IT department and the computer engineer course | ||
Department it = new Department("Avdeling for informasjonsteknologi", "IT123"); | ||
Course dataIngYVei = new Course("Bachelorstudium i ingeniørfag - data, Y-veien", "224 1014", it); | ||
|
||
// Make our student | ||
Student ola = new Student("Ola", "Nordmann", "12345678", dataIngYVei); | ||
|
||
// Our student loans a laptop | ||
Item laptop = new Item("Dell XPS 13"); | ||
Loan olasLaptop = new Loan(laptop, ola, new GregorianCalendar()); | ||
|
||
System.out.print(olasLaptop.getLoanDate().getTime()); | ||
System.out.print(" lånte " + olasLaptop.getPerson().getName() + " " + olasLaptop.getPerson().getSurName() + " "); | ||
System.out.print(olasLaptop.getItem().getAmount() + " " + olasLaptop.getItem().getName() + "\n"); | ||
|
||
System.out.print(olasLaptop.getPerson().getName() + " " + olasLaptop.getPerson().getSurName() + " er " + olasLaptop.getPerson().getClass().getSimpleName()); | ||
} | ||
} |