“Still Life with Fruit”

ADT Design

CSc 216: SoftwareEngineering

 

An artist wants some software to represent objects he might manipulate in still life paintings. 

For our prototype, we want to design a system that manipulates different kinds of fruit in a bowl. 

Fruit generally have the following attributes of interest: they have a color, a size, and a center

located in two‑dimensional space. To keep the prototype simple, colors will simply be strings,

and the only geometric attribute we will consider is size.  The artist wants to be able to manipulate

these attributes: changing colors, growing (or shrinking) size, moving centers.  However,

different kinds of fruit have different default colors and sizes. Apples are (by default) red

and 2" in diameter, bananas are yellow and 6" in length, grapes are purple and come in clusters

of seven grapes.  When an apple changes size, its diameter grows (or shrinks) by some specified

amount (positive or negative), but bananas grow longer or shorter, and grapes add or remove

some whole number of grapes to the cluster. Finally, a bowl is a collection of fruit, to which

the artist may add or remove individual fruit (apples, bananas and grapes), access individual fruit

(in order to change their attributes), and print out the collection with their current attributes.

For the prototype, we will defer all user interface concerns; you may assume that all operations

will be demonstrated by a a main driver function. 

 

An analyst has already created UML class diagram for this problem, which you can find in

http://www.cse.lehigh.edu/~cimel/eval/beta/fruitUML.jpg. Your job is to flesh out a design

of this problem as a set of abstract data types (ADTs).  You can find notes explaining the form

of ADTs and several examples in http://www.cse.lehigh.edu/~cimel/eval/beta/sampleADTs.htm. 

 

[The following varies among four groups of recipients]:

Before doing this task, you should have completed the pretest, at http://lens.eecs.lehigh.edu/gblank.

(Login with your four letter Lehigh userid, password “cimel,” select Course CSc216 and Survey Pre-Test.)

Since you are in group A, so you won’t see the new multimedia yet.  

Please complete this assignment as soon as possible.   When you are done, take the posttest,

also at http://lens.eecs.lehigh.edu/gblank. (Same as the pre-test, only the survey is post.test.)

This assignment and the posttest must be complete by Tuesday, April 2. 

 

Before doing this task, you should have completed the pretest, at http://lens.eecs.lehigh.edu/gblank.

You are in group B, so you should go through the multimedia before doing this assignment.

(Login with your four letter Lehigh userid, password “cimel,” select Course CSc216 and Survey Pre-Test.)

Go to http://cimel.cse.lehigh.edu.  Login with your four letter Lehigh user id. 

Your password is your Lehigh user id backwards (e.g., abc1’s password would be “1cba”). 

You should go through the units on inheritance and abstract data types. 

You can ignore the exercise about emerging trends near the end of the inheritance unit. 

Please complete this assignment as soon as possible.   When you are done, take the posttest,

also at http://lens.eecs.lehigh.edu/gblank. (Same as the pre-test, only the survey is post.test.)

This assignment and the posttest must be complete by Tuesday, April 2. 

 

You are in group C, so you won’t see the new multimedia yet.   Please complete this assignment

as soon as possible.   When you are done, take the posttest, also at http://lens.eecs.lehigh.edu/gblank.

(Login with your four letter Lehigh userid, password “cimel,” select Course CSc216 and Survey Pre-Test.)

This assignment and the posttest must be complete by Wednesday, April 10. 

 

You are in group D, so you should go through the multimedia before doing this assignment.

Go to http://cimel.cse.lehigh.edu.  Login with your four letter Lehigh user id. 

Your password is your Lehigh user id backwards (e.g., abc1’s password would be “1cba”). 

You should go through the units on inheritance and abstract data types. 

You can ignore the exercise about emerging trends near the end of the inheritance unit. 

Please complete the multimedia as soon as possible, by Sunday, April 7. 

When you are done, you should complete this assignment as soon as possible. 

When you are done, take the posttest, also at http://lens.eecs.lehigh.edu/gblank.

(Login with your four letter Lehigh userid, password “cimel,” select Course CSc216 and Survey Pre-Test.)

This assignment and the posttest must be complete by Wednesday, April 10. 

 

Hand in: a set of ADTs for the Fruit problem, preferably as a Word document.   Email it to “CJ”

at .