首页 > > 详细

辅导SPSS|辅导Java程序|辅导Web开发|辅导Java程序

CSCI 1110 – Fall 2020
Assignment 04 – Due 11/04, 11 pm
Please start this assignment early; programming and logic take time - if you leave it to the last
minute, you might not have enough time to finish or might make silly mistakes that you otherwise
could avoid. Note that TAs and Instructors will not be able to answer last-minute questions!
All work is to be handed in Mimir, our online code learning environment. You should, however,
write your code on an IDE such as IntelliJ.
To complete this assignment, you will need to know about:
• Basic Java
• Conditionals
• Boolean Variables
• Loops
• Objects and Classes
• Java Collections Framework (Lists, Sets, Maps, Queues, Stacks)
Your code must compile. If it does not compile, you will receive a 0 (zero) on that portion of the
assignment, and no partial marks will be given.
Remember that students who hardcode their outputs to match the test cases in Mimir will
receive a zero on the entire assignment.
Grading Scheme: Please see the grading scheme at the end of this document.
Coding Style: You must proper variable names and comments. Please follow the guidelines on
https://web.cs.dal.ca/~franz/CodingStyle.html
Problem Overview
In this assignment, you will finish implementing a set of classes used to represent Students,
Courses and a University.
This assignment is meant for you to write code using the JFC collections (lists, sets, maps,
queues, etc.) and their built-in algorithms (e.g., contains method). Your goal is to read through
the already written javaDocs and fix the variable declarations and methods flagged with a ToDo
comment (//TODO).
You can create other private methods and variables if you want, but you don't have to. You also
don't have to add any more JavaDocs; however, inline comments are still required on the
methods you write code on.
The two classes you have to work in are University.java and Student.java.
Iterators on Maps
We discussed iterators in lectures 14 and 15. Iterators are what a foreach loop uses
"underneath the surface." We also explored how to retrieve an iterator from a List and use it to
iterate over (and even remove) the collection using while loops.
You cannot get an iterator from a map directly since the stored information is associated with a
tuple of keys and values. To iterate on a map, you have to get the keys from the map and
iterate over them. Example:
• Assume that you have a map that associates Farms and Cows (

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!