Fun With Objects

已完成 已发布的 Dec 11, 2003 货到付款
已完成 货到付款

**_Description:_**

Old MacDonald had a farm, as the story goes, e-i-e-i-o. And on this farm he had a bunch of Animals specified below, e-i-e-i-o.

Animals:

* 2 Pigs, named; Oscar and Meyer

* 1 Horse, named; Man-of-war

* 3 Sheep, named; Dolly, Shy, and Dolly(to be explained)

* 1 Cow, named; Abunga

Your mission is to write an application (named Lab4yourname) that will create an object for each of Farmer MacDonald’s animals, and to invoke member methods of each,

Methods for all Animals:

* a valid constructor

* String makeSound(); // will return a String with the sound the animal makes

* String whatType(); // will return a String with the type of animal it is

* String toString(); // will show all of the member data values of the object

Member variables for all animals

* String name;

* int age;

* String color;

* One more variable of your choice.

Create 5 user-defined types, and show that you have mastered the ability to create objects of these types. 4 of them will extend from the Abstract (super) class Animal.

For one sheep you will “clone?? it, that is creating a constructor that will take all the information from the first sheep and place its attributes into the third sheep.

You will finally create an array of type Animals within the application and place each of Farmer MacDonald’s animals into the array, and using a for loop, utilizing the _static class member variable_ **animalCount**, print to a single dialog box, each specific animal’s name, type and age. (You may do this with 3 methods, or simply overload the toString method.

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

## Platform

windows/any

工程 Java MySQL PHP 软件构架 软件测试

项目ID: #3042122

关于项目

14个方案 远程项目 活跃的Dec 12, 2003

授予:

always99vw

See private message.

$15 USD 在4天内
(22条评论)
3.4

有14名威客正在参与此工作的竞标,均价$17/小时

alisheharyarvw

See private message.

$12.75 USD 在4天内
(100条评论)
6.6
bahe

See private message.

$8.5 USD 在4天内
(147条评论)
6.5
mintrelinva

See private message.

$8.5 USD 在4天内
(91条评论)
5.9
senzaciosnegyes

See private message.

$15.3 USD 在4天内
(104条评论)
4.9
herculesevw

See private message.

$16.15 USD 在4天内
(79条评论)
4.7
exceptionalcoder

See private message.

$29.75 USD 在4天内
(8条评论)
4.0
absolutredbull

See private message.

$25.5 USD 在4天内
(56条评论)
3.9
grayfacedbu

See private message.

$21.25 USD 在4天内
(39条评论)
3.5
MattchedIT

See private message.

$8.5 USD 在4天内
(17条评论)
3.4
patrica

See private message.

$20.4 USD 在4天内
(19条评论)
3.2
devgu

See private message.

$12.75 USD 在4天内
(2条评论)
2.0
cbhoffman

See private message.

$17 USD 在4天内
(0条评论)
0.0
darkjava

See private message.

$29.75 USD 在4天内
(1条评论)
0.0