private
, Getters, Setters, toString
, and Memory RepresentationDue Wednesday, November 8 at 11:59 PM
By the time you have completed this work, you should be able to:
toString
method in a class
Rectangle.java
Download the Rectangle.java
file, and open it in jGrasp (or a text editor of your choice).
You will need to define a constructor for this class
, along with a series of methods.
The comments in Rectangle.java
provide further details.
RectangleMain.java
Download the RectangleMain.java
file, and open it in jGrasp (or a text editor of your choice).
You will have to complete the addSomethingToWidthHeight
method in this file.
The comments in RectangleMain.java
provide further details.
A handout concerning memory representation and program outputs is distributed along with this lab. Complete the questions in the handout. You may physically turn in the handout on class Thursday, or scan it / take high-quality pictures of it and submit it along with your code to Canvas.
Log into Canvas, and go to the COMP 110L class. Click “Assignments” on the left pane, then click “Lab 17”. From here, you can upload your answers and your code. Specifically, you must turn in the following two files:
Rectangle.java
RectangleMain.java
If you choose to digitally submit your handout, you must submit it in one of the following formats:
.png
.jpg
.gif
.pdf
In addition, if you collaborated with anyone else, be sure to download collaborators.txt
and write the names of the people you collaborated with in the file, one per line.
Please submit this file along with the other files.
You can turn in the assignment multiple times, but only the last version you submitted will be graded.