Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package maps.ThirdApproach;
- import java.util.ArrayList;
- import java.util.Map;
- class Student {
- String name;
- String surname;
- public Student(String name, String surname) {
- this.name = name;
- this.surname = surname;
- }
- }
- class Lesson {
- String lessonName;
- Map<Student, ArrayList<Integer>> grades;
- public Lesson(String lessonName) {
- this.lessonName = lessonName;
- }
- }
- public class Main {
- public static void main(String[] args) {
- Student student = new Student("John", "Smith");
- Student student2 = new Student("Marry", "Lou");
- Student student3 = new Student("Victor", "Wick");
- Lesson lesson = new Lesson("Biology");
- Lesson lesson2 = new Lesson("Chemistry");
- ArrayList<Lesson> lessonData = new ArrayList<>();
- ArrayList<Student> studentData = new ArrayList<>();
- lessonData.add(lesson);
- lessonData.add(lesson2);
- studentData.add(student);
- studentData.add(student2);
- studentData.add(student3);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement