Java Midterm Exam
- This exam consists of writing a set of Java classes, so as to pass a series of provided tests in JUnit.
- The classification is proportional to the number of tests run successfully, assuming that the code is generic enough to pass similar tests.
- There is a minimum score of 40% (40% of the test methods provided must pass).
- The test code is self-explanatory concerning desired functionality.
- The program should be developed iteratively, following the order of test cases provided, although some (if not all) of these are independent (and therefore able to be resolved in a different order).
- As some classes do not exist until you have created them, tests will not run due to compilation errors. You can “comment” all the tests at first, and un-comment them, one by one, as you progressively solve them.
- Consultation of any reference materials (printed sheets, books, electronic media) is not allowed, except the ones provided during the exam:
- Java lecture slides.
- The JAVA API documentation (link to Oracle).
- The test will have a duration of 120 minutes.
- Upon starting the test, no one will be allowed to leave the room, unless they have already submitted their resolution, or have an ulterior motive that will justify leaving and returning (at the teacher’s discretion). There will be no bathroom leaves, so go before starting the test.
Below you will find some past exams.
- To practice, just unzip the given file anywhere on your computer, and open the provided IntelliJ project.
- To make things easier, tests and classes are all in the same folder (there is no test folder).
- You cannot change the test file in any way (besides commenting and un-commenting tests).
In the actual exam, you will use Juet (a Java Unit-testing Evaluation Tool) to upload your source code.
An instance as been loaded with the 2018’s exam, so that you can test the system, at https://dbm.fe.up.pt/lpoo/practice/. Some important notes regarding Juet:
- You should use your FEUP credentials (username without the @fe.up.pt) to login.
- The secret code is 1234.
- Juet can only be accessed from inside FEUP or by using VPN.
- You can download the project to be used during the exam directly from Juet.
- The project does not have Gradle initialized. To run the tests, just right-click on the test file and select “Run All Tests”.
- For simplicity sake, tests and source code are in the same folder.
- For simplicity sake, tests and classes should remain in the default package.
- All tests are commented by default. This makes it easier to solve each test individually.
- In the exam, the top right corner will have a countdown timer with the remaining time. After this timer reaches zero, no more submissions will be accepted. Please submit early.
- You only have to submit your Java files. You can select many files at the same time.
- Evaluation is automatic but not immediate.