HashMap Exercise Easy

From Progzoo
Jump to: navigation, search

In these questions the HashMap events maps the id (for example "SET07102.L01") to events. Events have the following public properties:

  • String id;
  • String module;
  • String etype;
  • String day;
  • String start;
  • int duration;
  • String weeks;
  • String room;
  • String staff;
  • ArrayList<String> students;

Where is SET07102 Lecture 1

The code given prints the module for the event JAC09116.L1b.

Look up the event with id SET07102.L1 and print the room.


[Font] [Default] [Show] [Resize] [History] [Profile]

Who attends SET07102.L1

Print all the student groups that attend SET07102.L1


[Font] [Default] [Show] [Resize] [History] [Profile]

What is on in A17 on Monday

The given code finds all events where the module is DES09110 and the room is Merch.B25.dm

Print the id of each event that is on in Merch.A17 on Monday


[Font] [Default] [Show] [Resize] [History] [Profile]

How many hours for SET07102

Add the duration for each event where the module is SET07102


[Font] [Default] [Show] [Resize] [History] [Profile]

Which events do Co.Cc1f-B attend

Print the id for each event attended by student group Co.Cc1f-B


[Font] [Default] [Show] [Resize] [History] [Profile]