Skip to content

jalexanderqed/F16-lab04

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

F16_lab04

Base repository for CS56 F16 lab04 (Open Source)

Student Instructions

See: https://ucsb-cs56-f16.github.io/lab/lab04/

How to run this code (originally: grader hints)

Originally, this section of the README.md was called grader hints, but is occurred to me that students completing the assignment should probably read this also. These are the commands that the TA, Reader, Instructor are going to use to check your work, so it will benefit you to run these commands also.

In addition, you can see examples of some past student work that illustrates what you are supposed to do in this assignment.

Overview

  • Use ant -p to see all available tasks
  • The grader tasks include these:
 gradeMPV1          run MultiPictureViewer for studentName with arg 1
 gradeMPV2          run MultiPictureViewer for studentName with arg 2
 gradeMPV3          run MultiPictureViewer for studentName with arg 3
 gradePV            run simple.PictureViewer for student in studentName property
 gradeSimpleGui1    run simpleGui1 for student in studentName property

To run one of those tasks, overriding the student's CSIL id to jgaucho, use, for example:

ant -DstudentName=jgaucho gradePV

You can test this with studentName set to pconrad, andrewberls, or jstaahl as examples. All of those should work on pconrad, though only the MPV tasks will work for the other two.

Detail

Showing the House and Incomplete Snowman

Try executing the following:

ant -DstudentName=pconrad gradePV

What you should see will look something like the picture shown at right.

Sample output from ant -DstudentName=pconrad gradePV

This is sample output from the program src/edu/ucsb/cs56/drawings/pconrad/simple/PictureViewer.java.

It shows code that was drawn by: edu.ucsb.cs56.drawings.pconrad.simple.PictureComponent. This code draws a simple house, and an incomplete snowman.

One of your "warmup exercises" for the lab is to try to complete your own version of this snowman (or, if you prefer, "person of snow".) This requires you to understand the Circle class which is in that same directory, and is just a simple wrapper around the built-in Ellipse2D class provided by that Java libraries.

Showing examples of three drawings from each of two student submissions:

Now try these commands:

  • ant -DstudentName=andrewberls gradeMPV1
  • ant -DstudentName=andrewberls gradeMPV2
  • ant -DstudentName=andrewberls gradeMPV3
  • ant -DstudentName=jstaahl gradeMPV1
  • ant -DstudentName=jstaahl gradeMPV2
  • ant -DstudentName=jstaahl gradeMPV3

What you should see in the first three cases are three pictures defined by three methods of the class edu.ucsb.cs56.drawings.andrewberls.advanced.AllMyDrawings

Here are screenshots of the images that result from running those commands:

Sample output from ant -DstudentName=andrewberls gradeMPV1 Sample output from ant -DstudentName=andrewberls gradeMPV2 Sample output from ant -DstudentName=andrewberls gradeMPV3

All of those are the result of the two iPod images defined in these classes, one of which inherits from the other:

Similarly, the second three images are the result of the methods of the class edu.ucsb.cs56.drawings.jstaahl.advanced.AllMyDrawings

All of those are the result of the two pencil images defined in these classes, one of which inherits from the other:

Here are screenshots of the images that result from running those commands:

Sample output from ant -DstudentName=jstaahl gradeMPV1 Sample output from ant -DstudentName=jstaahl gradeMPV2 Sample output from ant -DstudentName=jstaahl gradeMPV3

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%