6.102 — Software Construction
Spring 2024

Problem Set 2: Midpoint

Please think about the work you have done so far on Problem Set 2 and answer the following questions.

reflection

Defining Abstractions in PS2

Suppose we choose to implement City with the following rep:

export class City<L> {
    private groundFloor: RegionSet<L>;
    private upperFloors: Map<number, RegionSet<L>>;
}

Let’s leave aside the question of whether this is a good choice of rep.

When we implement checkRep() for City, which of the following are true about the Map upperFloors?

(missing explanation)

When we implement checkRep() for City, which of the following are true about the RegionSet groundFloor?

(missing explanation)

When we write the abstraction function AF(…) for City, which of the following are true?

(missing explanation)

Time Spent

How much time in hours did you spend working on the alpha? Please enter a number (which may be a decimal fraction).

How much time in hours did you spend working on code review? Please enter a number (which may be a decimal fraction).

Collaboration

I helped somebody, or was helped, while both of our solutions were visible on our screens.

(missing explanation)

I ran my test cases on another student’s code, or another student’s test cases on my code.

(missing explanation)

For every piece of code that I found on the web and used in my solution, I included a comment citing the source of the code.

(missing explanation)

I worked on my solution while somebody else’s solution was visible to me (e.g. on Caesar, or in some other window on my screen, or on somebody else’s screen, or on paper).

(missing explanation)

I worked closely with somebody on part of the problem set, discussing or sharing step-by-step, algorithmic instructions.

(missing explanation)

I was helped by somebody who is neither a current 6.102 staff member, nor a current 6.102 student, nor an HKN tutor assigned to me.

(missing explanation)

I obtained part or all of somebody else’s solution electronically, or provided part or all of my own solution to somebody else.

(missing explanation)