Skip to content

Commit

Permalink
Added WIP project
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornarhagen committed Feb 13, 2017
1 parent cad119c commit d90d7c1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/app/App.java
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());
}
}

0 comments on commit d90d7c1

Please sign in to comment.