Eboard 10 (Section 1): Inheritance

You are probably being recorded (and transcribed) [at least if Sam is here and can get the technology working]

Approximate overview

  • Preliminaries
    • Notes and news
    • Upcoming work
    • Tokens
  • Questions
  • MP3
  • MP5
  • Lab

Preliminaries

News / Notes / Etc.

So much stuff to discuss. Feel free to ask questions as we go.

Grade reports

  • Grade reports distributed Sunday night. I’ll try to distribute those each week after I grade the SoLA.

Learning outcomes on lab reports

  • When you fill in learning outcomes on a lab report, I’d recommend that you fill them in a form that you could come back to later and review. Answers like “I learned how a certain code can take different parameter types” or “I learned about inheritance” doesn’t let you do so.

Pre-assessments

  • When you fill in the pre-assessment, please try to ask questions. Asking (good) questions is a skill that you need to develop, so practice!
  • When I ask you to list resources, you should list specific resources (preferably with URLs), such as “the reading on inheritance” and not something vague like “readings”.

General skills

  • I put this in my last email, but I’ll remind you again. At this point in the semester, you should know our core tools.
    • You should be able to compile and test code in Maven (and read output).
    • You should be able to run and test code in VSCode.
    • You should be able to debug code in VSCode, particularly failed tests.
    • You should be able to push changes to your code to GitHub.
  • Why is that I keep saying “Don’t use git add .; add the files individually”, and you folks keep typing git add .?
    • This is a rhetorical question. Just don’t use git add ..

Mini-projects

  • Note that the primary goals of MP4 are:
    • To give you the experience of building a real data structure that others could use.
    • To give you more practice writing tests.
  • The potential chaos of the shared testing repo is just a pleasant additional outcome.
  • Because there were style issues in the original repo, I’m increasing the number of style issues permitted for M to 20 and E to 10.
  • We’ve already had issues with the shared testing repo. I’ve been cleaning them up as we go.
    • Incorrect code was pushed (at least twice). Please make sure to run mvn test and ensure that the errors are only test errors.
    • Extra files were added (.DS_Store, presumably by someone who used git add .)
    • At least one test placed inappropriate restrictions on the order in which values are reported in toString().
    • The code got reformatted.
  • It’s been suggested that I remind you that when you submit code to Gradescope from GitHub, and then update the code on GitHub, it doesn’t automatically. get updated on Gradescope.
    • Also: GitHub submission is the preferred mechanism for Gradescope.
  • I’m not sure whether I’ll be here on Thursday, so I’ll talk a little bit about MP5 today.

Upcoming work

Tokens

If you’d like to suggest token events, please let me know in advance of class.

Academic/Scholarly

  • Tuesday, 2024-10-01, Noon–1:00 p.m., JRC 224A (Day PDR). CS Table: When Robots Attack (or something like that)
  • Sunday, 2024-10-06, 7:00–8:00 p.m., Science 3819. Mentor Session
  • Tuesday, 2024-10-08, Noon–1:00 p.m., JRC 224A (Day PDR). CS Table

Cultural

  • Tuesday, 2024-10-01, 11:00a.m.–Noon, Bucksbaum 131. Royce Wolf Recital

Multicultural

  • Tuesday, 2024-10-01, 1:00–2:15 p.m., Steiner 205. Crip SpaceTime watch party
  • Friday, 2024-10-04, 4:00-5:00 p.m., HSSC N1170 - Global Living Room. Middle of Everywhere (Uganda?)

Peer

  • Friday, 2024-10-04, 5:30–8:30 p.m., Natatorium. Scarlet and Black

Wellness

  • Tuesday, 2024-10-01, 4:30–6:30 p.m., BRAC P103 (Dance Studio). Wellness Yoga
  • Tuesday, 2024-10-01, 4:30–6:30 p.m., ???. Forest Bathing (signup required)
  • Tuesday, 2024-10-08, 4:30–6:30 p.m., BRAC P103 (Dance Studio). Wellness Yoga
  • Tuesday, 2024-10-08, 4:30–6:30 p.m., ???. Forest Bathing (signup required)

Misc

  • Friday, 2024-10-04–Sunday, 2024-10-06. JRC 101. Pioneer Weekend
  • Frdiay, 2024-10-04, Merrill Park West (about 11th and Main). CS Picnic

Other good things (no tokens)

  • Tuesday, 2024-10-01, 4:00–6:00 p.m., Springer Field. Men’s Soccer vs. Knox
  • Tuesday, 2024-10-01, 7:00–9:00 p.m., Darby. Volleyball vs. Beloit
  • Wednesday, 2024-10-02, 4:00–6:00 p.m., Springer Field. Women’s Soccer vs. Knox

Questions

Questions on SoLAs

Why does it take you so long to get SoLAs back to us?

It’s the nature of the beast. I probably spend five minutes on each submission. 5 LAs x 40 submissions/LA x 5 minutes/submission = 600 minutes, or about ten hours. (I expect time to go down as you start getting used to LAs, since I can often just check “Satisfactory” for correct LAs.)

Questions on MP4

See the assignment for most of the Q&A. This section is here to give you the chance to ask more questions.

I’m worried that people will push incorrect tests.

It’s a reasonable worry. We all write incorrect tests (even me). But I’ll be running tests against my code and will try to correct them as I find them.

If you find what seems to be an incorrect test before I do, please let me know.

Do we need to write more tests than our three?

It’s up to you, but it’s not required. If you do write them, I’d encourage you to put them in the shared repo.

Other administrative questions

Why do you set up a 10:30 p.m. deadline?

To remind you that you should try to get to bed at a reasonable hour, particularly given that you have my class at 8:00 a.m.

When will we hear about tokens?

Someday.

What happens when we go negative?

You lose grades. But you can catch up by the end of the semester.

Other questions

MP3

New AsciiBlocks

Basic blocks

Alphabetical
Fill a rectangle with the alphabet.
Chessboard
Build a “chessboard” of alternating spaces and some character.
Circle
A filled circle.
Ladder
A ladder of a character side with vertical repetions.

Building new blocks from old

BezierCurveStamp
Another block with a Bezier curve superimposed on it.
Borders
Grabs only the “borders” of the block (first row, last row, first column, last column).
Checkerboard
Create a checkerboard of two blocks.
DiagonalFlip
Diagonally “flip” a block.
DropShadow
Another block with a drop shadow added.
DShift
Diagonally shift another block.
Encrypted
Another block with every character encrypted using something like a Caesar cipher.
Hollow
The outer edges of another block.
Matrice
Make a matrice (matrix?) from another block.
PatternBorder
Another block surrounded by a pattern of letters
Quartered
Another block broken into four parts with lines around them.
RandomBlock
Randomizes the characters in each row of a block.
ReplaceChar
Replace all instances of one character in a Block with another one.
Transpose
Transposes the block (flips the axes).

Ascii Art

MP5

Implement a basic Assistive and Augmentive Communication Device (AAC)

Fortunately, the UI is built already. You are building the back end.

Goals

  • Get you to think about accessibility.
  • Write code that fits into a larger project (even more so than in the AsciiBlocks project).
  • Reuse your AssociativeArrays.
  • See a different model of project and assignment design.

Notes

  • No Maven!
  • Not yet much of a testing infrastructure (hopefully forthcoming).

Questions:

What have prior students found challenging?

It takes a while to understand all that’s expected of you, but once you do, it feels surprisingly straightforward.

You will need to add at least one method to your associative arrays, either K[] getKeys() or String[] getKeysAsStrings().

At least one method has a weird design, and in addition to returning a value changes the state of the system. (Probably select, but perhaps others.)

AACMappings must understand that the category "" means “go to the top level.

Will we have style guidelines?

We will not grade you on style on this project, not least because Dr. Baker uses a very different style than Google Style.

Please try to write readable code in any case.

Lab

The person closer to the board is Driver A. The person further from the board is Driver B.

Make sure that the name of the repo ends with -maven.

Can you explain the DecrementableCounter example?

We have Counter gamma = new DecrementableCounter(-5);

While we can call gamma.increment();, we can’t call gamma.decrement(), when though we know gamma has a decrement method.

The issue is that we’ve told Java that gamma is a Counter, so it doesn’t know that it has a decrement method (not all Counter objects have such a method).

The solution is to declare gamma as a DecrementableCounter.

DecrementableCounter gamma = new DecrementableCounter(-5);