Is anyone here good with writing code in java?
#1
Is anyone here good with writing code in java?
Like the title says, is anyone here good with writing code in java? I have trouble in java and this last assignment has completely lost me. lol here's the assignment, let me know if you can help me out, it would be greatly appreciated!
The assignment is to implement a text-based graphics program using composition,
inheritance relationships and polymorphic behaviors (similar to the one we did in class
together) to the one the author does in chapter 9 of the textbook.
We wish to produce a “shapes” taxonomy that would allow for a hierarchy of graphical
objects; such as Points, Lines, Circles, Rectangles, Cylinders and Cubes to be “drawn”.
In order to keep things simple, our drawing for this assignment will only amount to
sending text out to the console (hence the term “Text Graphics” for our assignment).
Arrange these as classes in a hierarchy and associate drawing behavior with each class
that is sensible to draw. (The Shapes class, for instance, would be an abstract class since there’s no reasonable way to draw a generic shape.) The drawing behavior for this
assignment need only consist of text output to the console that states where the shape is and how it would draw itself (just as we did in the example from class).
In your implementation be sure to use both inheritance and composition where
appropriate. Remember, inheritance is called an “IS-A” relationship and composition is
called a “HAS-A” relationship. This rule-of-thumb design principle works for most
simple taxonomies (such as this one).
You’ll also need to use polymorphism in your implementation (i.e. when implementing
the draw() method) so that each shape draws itself appropriately when sent the
draw() message.
inheritance relationships and polymorphic behaviors (similar to the one we did in class
together) to the one the author does in chapter 9 of the textbook.
We wish to produce a “shapes” taxonomy that would allow for a hierarchy of graphical
objects; such as Points, Lines, Circles, Rectangles, Cylinders and Cubes to be “drawn”.
In order to keep things simple, our drawing for this assignment will only amount to
sending text out to the console (hence the term “Text Graphics” for our assignment).
Arrange these as classes in a hierarchy and associate drawing behavior with each class
that is sensible to draw. (The Shapes class, for instance, would be an abstract class since there’s no reasonable way to draw a generic shape.) The drawing behavior for this
assignment need only consist of text output to the console that states where the shape is and how it would draw itself (just as we did in the example from class).
In your implementation be sure to use both inheritance and composition where
appropriate. Remember, inheritance is called an “IS-A” relationship and composition is
called a “HAS-A” relationship. This rule-of-thumb design principle works for most
simple taxonomies (such as this one).
You’ll also need to use polymorphism in your implementation (i.e. when implementing
the draw() method) so that each shape draws itself appropriately when sent the
draw() message.
Thread
Thread Starter
Forum
Replies
Last Post