ExampleQuiz

pdf

School

University of Toronto *

*We aren’t endorsed by this school

Course

350

Subject

Computer Science

Date

Dec 6, 2023

Type

pdf

Pages

3

Uploaded by MagistrateWorldChinchilla30

Report
MIE350F Example Lab Quiz #1 Lab Quiz Instructions: 1. Exam time: 5:10pm – 6:00pm 2. The last five minutes (5:55pm-6:00pm) should be used for submitting the project on Quercus (instruction provided below). Any submission later than 6:00pm (Quercus times) will not be graded! 3. Allowed materials: only materials available on the course Quercus page. a. No other materials allowed! b. Use of any other internet resources (including Google, Stack Overflow, and any other resource) is strictly forbidden! c. Communication with anyone in any form of communication is strictly forbidden! 4. Make sure you complete the attendance sheet and it is collected by the TA. a. If your name is not recorded, your quiz will not be graded. Before You Begin: 1. Log into Quercus and Go to the “Lab Quiz 1 Submission” assignment. 2. Download quiz_ cms.zip to your home drive (W:\). 3. Right click on quiz_ cms.zip and select 7-Zip à Extract Here 4. You should now have the extracted folder W:\quiz_cms 5. Open the new quiz_cms project in IntelliJ IDEA. Run your project and make sure the log shows “ APPLICATION IS RUNNING ”. Stop the application and continue to the questions below (detailed instructions provided in Lab 1). You must use quiz_cms.zip. Do not use any of the older version of cms used in the lab! Reminder #1: If you stumble upon a build error, see “MIE350 CMS Loading Tips” on Quercus. Reminder #2: if your code is running but is not working as expected – check if an error message has been printed to the program output in the “Run” terminal window.
Questions to Answer: 1. The current CMS has a feature for finding the top students, i.e., students with average mark greater or equal to 90 implemented in findTopStudents in StudentRepository and can be called remotely (over REST) using a GET request to URL “ /students/top ”. a. We would like to modify the feature to support a threshold provided by the user. Specifically, users should be able to send GET request to /students/top/{threshold}” and receive the list of students with average mark greater or equal to {threshold}. Note: you can use the Insomnia client to test your code. b. The school’s criteria states that a top student should not have any grades lower than 60. Modify the feature of finding top students such that in addition to average mark above threshold it also guarantees that the returned students do not have any course with mark below 60. c. Edit the data.sql file and add a record that indicates the student ‘Jaime Lannister’ got the mark 45 in the course ‘A Game of Thrones’. Note: The new mark of 45 should disqualify ‘Jaime Lannister’ from being a ‘top students’. 2. The CMS has a new entity, Department, that includes for each department the department code (e.g., “MIE”), the name (e.g., “Mechanical and Industrial Engineering”), and the contact email. a. Extend the Course entity to include a field that indicates the department each course is associated with (the field can be empty to indicate courses not associated with a department) and define the many-to-one relation to the Department entity. b. Edit data.sql such that at least one of the courses will have a department associated with it (choose from the departments currently in the database). c. Make sure that the details retrieved for course(s) through GET requests to “ /courses and “ /courses/{code} ” include the full details of the department if one is associated with the course (including the code, the name, and the contact email). 3. We would like to record the home address of each professor in the system: a. Extend the Professor entity to include an address field (the field can be empty). b. Make the necessary code changes in CMS to make sure that the feature of updating professor’s details also support updating the professor’s address.
Submit your solutions (start no later than 5:55pm): 1. Export your project using File à Export à Project to Zip File… 2. Save your project to W and set the name to be [YourFullName]_[StudentID].zip 3. Upload your Zip file to the submission box on Quercus called “Lab Quiz 1 Submission”
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help