2 small tasks

account_circle Unassigned
schedule 2 Days
account_balance_wallet $5


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. What does the error look like?


Create a small program that defines some fields. Try creating some illegal field names and see what kind of error the compiler produces.

In the program you created, try leaving the fields uninitialized and print out their values. Try the same with a local variable and see what kind of compiler errors you can produce. 

Jul 29th, 2013
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)

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

Jul 31st, 2013

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
Jul 29th, 2013
Jul 29th, 2013
Mar 21st, 2018
Mark as Final Answer
Unmark as Final Answer
Final Answer

Secure Information

Content will be erased after question is completed.

Final Answer