Results 1 to 5 of 5
  1. #1
    Nari is offline Member
    Join Date
    Nov 2007
    Posts
    11
    Rep Power
    0

    Default 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.

  2. #2
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    7

    Default

    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

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    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. :)

  4. #4
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    9

    Default

    This is your exam- not ours. YOU need to do the work if you expect to be taken seriously. End of story.
    Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
    Want to voice your opinion on your IDE/Editor of choice? Vote now!
    Got a little Capt'n in you? (drink responsibly)

  5. #5
    Nari is offline Member
    Join Date
    Nov 2007
    Posts
    11
    Rep Power
    0

    Default

    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.

Similar Threads

  1. Discount Java Certification Exam Vouchers
    By mbrown36 in forum Reviews / Advertising
    Replies: 17
    Last Post: 12-15-2009, 07:10 PM
  2. SCBCD 5.0 Mock Exam Questions
    By kks_krishna in forum Reviews / Advertising
    Replies: 0
    Last Post: 04-02-2008, 09:26 AM
  3. GUI problems.
    By saytri in forum New To Java
    Replies: 1
    Last Post: 12-16-2007, 11:27 PM
  4. problems with JPA
    By Ed in forum New To Java
    Replies: 2
    Last Post: 07-04-2007, 06:34 AM
  5. Java cert exam samples
    By orchid in forum New To Java
    Replies: 5
    Last Post: 06-04-2007, 10:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •