************************************************************ an Incomplete OM, you do not have boxes with class information for all of the classes that you plan to write. Your OM currently shows your whole project having only three methods written by you (other than the listeners). That looks like bad OO design. In your ADT’s you have a class with *only* a constructor. (Image) What good would such a class do? Your ADT’s are incomplete. Example, post for Rectangle draw method is “Rectangle drawn.” HERE – I will give you the code for it g.drawRect(10, 10, 100, 100); that fits your specification for Post condition. Your class has the following attributes private static final long serialVersionUID = 1L; Choice colors; Choice shapes; Choice myActions; Panel myPanel; Vector myShapes = new Vector(); int sX, sY, eX, eY, dragX, dragY; int ulX, ulY, lrX, lrY; boolean sPoint = false; Yet your object model lists only 4 – and three of them have the same name “list”! How would java differentiate that?! ADT’s imcomplete ************************************************************ In your DrawingApp class, you have the method paint with POST: the applet has been rendered This is vague. Also, you have a link or two in your OM that is an association link with no words on it to identify how/why they are associated. For example, your DrawingApp to MyMouseAdaptor could have the words View/Controller on the link to identify that relationship. DrawApp to DrawShapePanel has no association wording. ************************************************************ I see that your applet uses Buttons but you do not show them in your OM, nor do you show use of an ActionListener. Your MouseMotionListener and MouseListener specify no methods to be implemented in the OM and are not in your ADT “Keeps track of” is not informative. What kinds of things do you expect to draw in this applet? Each thing drawn is an object and hence needs a class to instantiate it. OM and ADT’s incomplete ************************************************************ If your object “Editor” which inherits from Applet, you would not write your own constructor, but rather use the init() method to construct the applet instance. Applets are the one class that does not explicitly name a constructor since the applets are called from the browser – not from another class. In your ObjectModel, I see a box for MouseListener that has the methods for MouseListener AND MouseMotionListener. As they are two distinct interfaces, they should each have their own box. Also I do not see the method for the ActionListener anywhere What kinds of Shapes do you expect to use in your application? You do not provide classes to make instances. Will your Editor have a canvas or someplace to actually draw on? I ask since I see a line to differentiate the controls area from the drawing area You do not need a Main class or a main method for an applet. The browser will start it. And, if you DID have it, it should be in the OM too Your MyMouseListener should not inherit from Object, but rather from the MouseAdapter. Even still – there are TWO mouse listeners in your MouseListener. You have methods for both MouseListener AND MouseMotionListener Your Shapes ADT is OK, but the Editor specs are vague ************************************************************ In your GraphicsEditorToolPanel class, you have the method paint with POST: Renders the tool panel This is vague. For Posts, you say “moves the shape” and “draws the shape”. I know this is picky but it is also easy to fix. Add one or two more words there in: “moves the shape just chosen” and “draws the shape just chosen with its attributes”. ************************************************************ In your ActionPanel class, you have the method actionPerformed with POST: An action event is executed for a component. This is vague. Can I pick ANY action to perform for ANY component. In your ColorPanel, you have the method actionPerformed with POST: An action event is executed for a component. Can I use the same code for both since they have the same POST conditions? In Image you have the method draw with POST: An image is drawn onto the canvas. ANY image? ANYWHERE? In the MouseController you have POST conditions such as POST: The bottom right coordinates are assigned. To what? Be more clear ************************************************************ In your Box class, you have the method draw POST: draws the shape to the screen The shape? Anywhere on the screen? This is vague ************************************************************ In your Ellipse class you have two methods. Here are the specs that you provide for them in your ADT: fill: Pre: The method is called from the paint method of the PaintBrushApplet to draw a fill the ellipse Post: The selected ellipse is filled with a color move: Pre: The method is called from the paint method of the PaintBrushApplet to draw a fill the ellipse Post: The selected ellipse is filled with a color How about this one: draw: Post: An ellipse is drawn ANY ellipse? or will there be certain specifications to the ellipse that will be drawn? HERE – I will give you the code for it g.drawOval(10, 10, 100, 100); that fits your specification for Post condition. In ImageVector, you have addImage: Post: An Image is added to vector ANY Image? In RightPanel and Shape you do not have pre and post for the methods ************************************************************ About the ADT’s post conditions. In some of the methods you say, “assumed that the only values altered in this method will be in the method's scope”. Now, I note that you say the same thing for the methods: MouseClicked, MouseReleased, MouseDragged. Since these all have the same post condition, I expect that I can use the exact same code for all? In many others, you say “POST: the requested value is returned”. Some return and int and some a boolean, etc. SO, all I have to do is to make sure I return something of that type? Be more clear ************************************************************ Structure Charts/Object Models really are drawn with the boxes and lines to show the attribute section and the method section. Please put in the lines within each class box. You could just give me the link to ../doc/index.html to get the links to each of the class ADTs without listing them explicitly on your page. Your Post conditions for your listeners are not very informative. “The thing that has been pressed will be executed” What exactly does that mean? The “thing” and “executed” are about as vague as one can get. Since these are all on mouse methods, and it is the mouse that is being pressed, I would assume you are going to now kill the mouse? ;-) Paint method post: “The graphics will be painted on the drawing space” What graphics? Editor init method post: “The editor will be initialized”. Bt default for applets, Java can call a no-op init method and the object will then be initialized. Is that all that this method needs? ************************************************************