• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Decide my java homework!

Soybomb

Diamond Member
For my java class I have to come up with a superclass and subclasses then:
Develop a class definition for the superclass. Include a constructor, setters for each instance variable, getters for each instance variable, and a method to display the contents of all instance variables. Also write a tester class that creates three instances, populates the instance variables, and displays the values of the instance variables. Allow the user to enter the values for one of the object's instance variables."

What would be a good superclass? My one friend suggested testicle with the subclasses left and right. I'm hoping for better from you guys 😀
 
well going with your idea, you could have the female body as a superclass, breast and pussy as the subclasses
 
Use superclasses to represent an "is a" relationship where the subclass has behavior which is more specific than the superclass. Your friend's suggestion actually is nothing more than a class/instance relationship, since the behavior of a "testicle" is the same whether it's on the left or the right.

well going with your idea, you could have the female body as a superclass, breast and pussy as the subclasses

This is an incorrect usage of the concept of super/subclasses, since breasts and vaginas are not female bodies. A female body may have two breasts and a vagina, but that relationship is best represented with the individual body parts as member variables of a female body class.
 
Use a bike as a superclass and then make the different kinds of bikes into a subclass.

If you want the more geeky way, make Chess Pieces a superclass and the more individual pieces a subclass.
 
Use people as the superclass and your subclasses can be dweebs, dorks, geeks, nerds, jocks, players, pimps, cops, whatever entertains you. You can give them attributes such as game, suaveness, social skills, looks, leadership, etc.
 
a simple one: shape (abstract class) -> circle -> eclipse
another : portable electronic devices -> portable CD players
 
Originally posted by: vtqanh
a simple one: shape (abstract class) -> circle -> eclipse
another : portable electronic devices -> portable CD players

Actually, that'd be

shape -> ellipse -> circle
 
Originally posted by: silverpig
Originally posted by: vtqanh
a simple one: shape (abstract class) -> circle -> eclipse
another : portable electronic devices -> portable CD players

Actually, that'd be

shape -> ellipse -> circle

oops, my bad 🙂
 
Back
Top