Write a java program that uses inheritance to extend box. Use the extend keyword to include weight.
// use the super keyword to access the variables
//of the parent class, remember that only weight(m)
//was declared in this class but the other three
//were declared in the parent class so to access them
//you must use the super keyword otherwise the
//compiler will generate an error.
reiyn17
0
Newbie Poster
Recommended Answers
Jump to PostNo, we won't write it for you. That is not helping you. You don't learn anything that way. And, if you're not going to learn anything, there is no need to take the class, and you definately should not pass it, if you don't learn anything.
Jump to PostAnd you should be thankful that glowkazaf told you how to do it in the first place even though the way you asked for help was rude. If you opened a Java book you would have found out that what you are being asked to do is the simplest thing …
All 6 Replies
glowkazaf
0
Newbie Poster
reiyn17
0
Newbie Poster
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
javaAddict
900
Nearly a Senior Poster
Team Colleague
Featured Poster
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
lovely12
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.