Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-21-2008, 04:52 AM
Member
 
Join Date: Nov 2007
Posts: 11
Nari is on a distinguished road
please help with exam problems
please help!!!

i have a exam tomorrow.

5) Draw an inheritance hierarchy to represent a shoe object. The base class should have derived classes of Dress Shoes, Tennis Shoes and Boots.

6) Implement the base class in the shoe hierarchy in number 5 above.
public class Shoe
{ private String color;
private String designer;
private double size;

7) Derive a class named Dress Shoes from the base class created in number 6 above
public class DressShoe extends Shoe
{
private String type; //valid types include pumps, heels and flats



8) Derive a class named Tennis Shoes from the base class created in number 6 above.
public class TennisShoe extends Shoe
{
private String soleType;
private String canvasType;


9) Derive a class named Boots from the base class created in number 9 above.

public class Boot extends Shoe
{
private String heelType; //valid types include pumps, heels and flats
10) Override the clone method inherited in the Dress Shoes class created in number 7 above.

11) Override the clone method inherited in the Tennis Shoes class created in number 8 above.

12) Override the clone method inherited in the Boots class created in number 9 above.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-21-2008, 08:10 AM
sukatoa's Avatar
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 526
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
If you have listened to your instructor and made some experiments on his examples and a little effort of exploration.... im sure you can do it......

What have you done so far?

regards,
sukatoa
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-21-2008, 08:14 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,511
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Quote:
Originally Posted by sukatoa View Post
If you have listened to your instructor and made some experiments on his examples and a little effort of exploration.... im sure you can do it......
Yep, we are not going homeworks for others Nari. As sukatoa says try something and get back to here if you have any question.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 04-21-2008, 07:48 PM
CaptainMorgan's Avatar
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 840
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
This is your exam- not ours. YOU need to do the work if you expect to be taken seriously. End of story.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
to our beloved Java Forums!
(closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
Got a little Capt'n in you? (drink responsibly)
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 04-21-2008, 09:47 PM
Member
 
Join Date: Nov 2007
Posts: 11
Nari is on a distinguished road
hi all
these were not my exam problems, these are review problems and my professor finished 4 chepters in 2 week. i was studing and couldn't solve these problems.My other classmates were not able to solve these problems and it was weekend, i didn,t know who to ask. but thanks a lot i already had exam this morning and i did well.
oh and problems i asked u 2-3 of them were in the exam and professor explained us what she is asking. so it wasn't that hard.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SCBCD 5.0 Mock Exam Questions kks_krishna Reviews / Advertising 0 04-02-2008 09:26 AM
Discount Java Certification Exam Vouchers mbrown36 Reviews / Advertising 0 12-29-2007 09:23 PM
GUI problems. saytri New To Java 1 12-16-2007 11:27 PM
problems with JPA Ed New To Java 2 07-04-2007 06:34 AM
Java cert exam samples orchid New To Java 5 06-04-2007 10:33 AM


All times are GMT +3. The time now is 11:44 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org