Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NEED HELP ASAP Step 1: defining fields of the MovieCreature class Create an empty class called Moviecreature and put the following enumerated type inside the

NEED HELP ASAPimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Step 1: defining fields of the MovieCreature class Create an empty class called Moviecreature and put the following enumerated type inside the class: enum Creaturesize \{ SMALL, MEDIUM, LARGE \} Next, add fields to the MovieCreature class to store the following information: - a name (of type String) - a date of birth (int) - a date of death (int) - a size (CreatureSize) Make sure the above fields are marked private to restrict access to them from outside the class. Step 2: defining constructors You will define two constructors for the creature class. The first constructor should take (in order) the following parameters: 1. the name of the creature 2. the date of birth of the creature 3. the date of death 4. the size of the creature (the parameter for this should be of type Creaturesize) The second (overloaded) constructor you define for the creature class should only take (in this order): 1. the name of the creature 2. the date of birth of the creature 3. the size of the creature (the parameter for this should be of type Creaturesize) Both constructors should initialize all the fields detailed in Step 1. Notice that in the first constructor, both a birth and death date must be supplied (thus the creature can be assumed to be dead). But in the second constructor, only a birth date is supplied ... so the second constructor assumes the creature is still alive. How you would like to track the alive (or dead) status of the creature within the class is up to you. II One straightforward possibility: use the convention that a death date

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 15th International Conference Dasfaa 2010 Tsukuba Japan April 2010 Proceedings Part 1 Lncs 5981

Authors: Hiroyuki Kitagawa ,Yoshiharu Ishikawa ,Wenjie Li ,Chiemi Watanabe

2010th Edition

3642120253, 978-3642120251

More Books

Students also viewed these Databases questions

Question

How many states in India?

Answered: 1 week ago

Question

HOW IS MARKETING CHANGING WITH ARTIFITIAL INTELIGENCE

Answered: 1 week ago

Question

Different types of Grading?

Answered: 1 week ago

Question

Explain the functions of financial management.

Answered: 1 week ago

Question

1. Does your voice project confidence? Authority?

Answered: 1 week ago