Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

help me! inheritance

Fri Nov 25, 2011 8:34 pm

Consider a class hierarchy involving motor vehicles. At the top of the hierarchy, class Motor_vehicle represents the most basic and general type of vehicles. Cars, Trucks, and Motorcycles are three types of vehicles that are extensions and specializations of the base class. Sport_Cars are included in the class hierarchy as a subclass of Cars.

Design the UML class diagram of all these classes. Include all attributes you find relevant for the classes, such as horse power, maximum speed, passenger capacity, load capacity, and weight. Include also all relevant methods.

Implement these classes and write test program to test your classes


I tried to solve it but i feel that is not accurate!



Re: help me! inheritance

Sat Nov 26, 2011 12:09 am

please we don;t solve full assignments , please post your progress and we will try to give you hints.

to know how to implements inheritance concept using java please read following topics :
java/what-is-inheritance-t573.html
java/inheritance-in-java-t3534.html

Re: help me! inheritance

Sat Nov 26, 2011 8:25 am

this is not an assignment!

Re: help me! inheritance

Tue Nov 29, 2011 1:12 am

Anyway , i think you can use eclipse to draw the UML of your package and in this UML you will have to define the relationships between the class , i remember that eclipse generate the code automatically for the design GUI .

Re: help me! inheritance

Tue Nov 29, 2011 7:02 am

msi_333 wrote:Anyway , i think you can use eclipse to draw the UML of your package and in this UML you will have to define the relationships between the class , i remember that eclipse generate the code automatically for the design GUI .



Yes I know all of that . I need help in coding

anyway I'll send U my solution and please look at it

Re: help me! inheritance

Tue Nov 29, 2011 10:20 pm

sure , please post it here .. :) , to know how to implements inheritance concept using java please read following topics :
java/what-is-inheritance-t573.html
java/inheritance-in-java-t3534.html

Re: help me! inheritance

Sun Dec 04, 2011 4:03 pm

Consider a class hierarchy involving motor vehicles. At the top of the hierarchy, class Motor_vehicle represents the most basic and general type of vehicles. Cars, Trucks, and Motorcycles are three types of vehicles that are extensions and specializations of the base class. Sport_Cars are included in the class hierarchy as a subclass of Cars.

Design the UML class diagram of all these classes. Include all attributes you find relevant for the classes, such as horse power, maximum speed, passenger capacity, load capacity, and weight. Include also all relevant methods.

Implement these classes and write test program to test your classes.

Post a reply
  Related Posts  to : help me! inheritance
 inheritance in c++     -  
 Need Help about Inheritance     -  
 What is Inheritance?!!     -  
 Inheritance C++ Example     -  
 Inheritance in c++     -  
 Inheritance in java     -  
 @AttributeOverride with Inheritance     -  
 Multiple Inheritance     -  
 single table inheritance     -  
 Inheritance & polymorphism checker code     -