Exam 1

Release: 7pm Thursday April 14th, 2022

Due: 11am Sunday April 17th, 2022

We will not accept late submissions.

This page details a take-home exam that you will complete over the next day. You can’t communicate with anyone about the content of the assignment until the exam ends. You can message us privately on Piazza, but the course staff will not give programming advice or answer most questions about the problems. If you have technical trouble creating a screencast (detailed below) feel free to reach out for assistance.

Do not use any online service other than Piazza to ask questions about the assignment. Do not search for, solicit, or use solutions to the problems that you find elsewhere for the exam. These are all violations of academic integrity that students have committed on exams like this in the past.

You can make use of any course notes, online resources about Java and its libraries, Java tools, and so on to complete the exam, including re-using code from class notes.

You can review the grading policy for exams in the syllabus. You will complete the programming task below and submit your work to the Exam1 Gradescope assignment.

Submission checklist (see long descriptions below for full details). Make sure that you follow the same filenames as mentioned below:

Make sure to look at your Gradescope submission after submitting to see if all the required files are there.

Task 1 and 2 will be autograded. Task 3 will be manually graded

Make sure that your submission passes autograder for your code to be properly graded.

If you are having issues with getting the autograder to run successfully, you may find it helpful to consult the Developing with the Gradescope Autograder in Mind guide.

If your submission passes the autograder, then you should see output similar to:

Be aware that the Compile check does not check for code correctness, but rather that your code compiles. Additionally, if your code errors or throws exceptions unexpectedly, the autograder will not grade your submission. This will result in 0 points being given for that particular task.

Your submission will be graded after the deadline. You should test thoroughly yourself to make sure your program works as expected.

Clarifications

Can I use a Java feature/library/method that we haven’t covered in class?

No. Strive to create a solution that only uses concepts covered so far in the course.

I can’t get my code to run on my computer.

Ideally, you should have already solved this issue as we are running programs the same way as PA1 and PA2. But you may try reviewing the previous public Piazza posts, which have lots of advice about fixing these situations. Also make sure that your code doesn’t have a bug before you blame your computer or ./run!

I get a score of 0.0/0.0 on autograder.

This is expected, we will reveal scores after the exam has concluded.

It says the autograder didn’t run successfully.

Make sure that your code has no errors and you match the specification for ALL classes and method headers exactly.

Can I submit multiple times until the deadline?

Yes, we will grade the last submission you make before the deadline.

Tasks

You can find the starter code in this repository https://github.com/ucsd-cse11-sp22/cse11-exam1-starter.

Task 1 - Geometry

In the Line class in Line.java, you will use the design recipe to write two methods:

Note that it’s fine to add more methods than what we’ve listed, but these two methods must appear as described.

Note that you should use the full design recipe – include enough examples to convince yourself the method works

Task 2

In BankTransfer.java, you will add:

In BankTransfer.java, you will add:

Additionally, you will add 2 methods to the Account class.

In the BankTransfer class, you will add and save to a field:

To verify that your code is working correctly, use the run command and check whether the output on the command line is what you expect.

Task 3 – Video

You will record a short video of no more than 5 minutes. Include:

Your task:

An example of what your video should look like when doing this kind of explanation is here:

https://drive.google.com/file/d/117NfZaHXbHtMJZJmLRVeRy-1b9cY3jei/view?usp=sharing

Here is a tutorial for creating a screencast like this https://ucsd-cse11-sp22.github.io/assignments/pa2.html.

Here are some notes on how to improve your videos: