Results 1 to 3 of 3
  1. #1
    Syed Rizvi is offline Member
    Join Date
    Jul 2013
    Posts
    8
    Rep Power
    0

    Question Creating New Classes

    I am a newbie to Java.

    Need help solving java oracle exercise questions

    Create four new classes for each real-world object. For each new class that you have created, create an interface that defines its behavior, then require your class to implement it. Omit one or two methods and try compiling.

  2. #2
    Syed Rizvi is offline Member
    Join Date
    Jul 2013
    Posts
    8
    Rep Power
    0

    Default Re: Creating New Classes

    I have 4 objects with fields and behaviors given below: but don't know how to attempt this question.

    1. Dog
    fields are (color breed and age) behaviors are (barking, running and wagging tail)

    2. Car
    fields are (gear, speed, cadence) behaviors are (changing gear, applying brakes and changing cadence)

    3. Alarm Clock
    fields are (current time, Alarm volume and Alarm) behaviors are (time correct or not, increasing alarm volume, decreasing alarm volume, turn alarm on and turn alarm off)

    4. Radio
    fields are (on, off and current station) behaviors are (turn on, turn off, scan, change station and seek)

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,202
    Rep Power
    19

    Default Re: Creating New Classes

    Start by going through the Oracle Java tutorials. You'll find everything you need to know in the first few lessons.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Help with Creating Classes
    By d300539 in forum New To Java
    Replies: 5
    Last Post: 04-07-2013, 11:08 PM
  2. Abstract Classes??? Creating a new object????
    By jonytek in forum New To Java
    Replies: 2
    Last Post: 03-07-2011, 03:34 AM
  3. classes and creating objects
    By Latanyar in forum New To Java
    Replies: 4
    Last Post: 11-01-2010, 07:14 PM
  4. help creating two classes that function together
    By sinreaver in forum New To Java
    Replies: 6
    Last Post: 10-01-2008, 03:44 AM
  5. Creating inner classes
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-16-2008, 11:07 PM

Posting Permissions

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