subject

Imagine your project team is developing a Java application that will serve as an educational tool to help children learn about various concepts such as vehicles, animals, sounds, etc. The application will have a need to draw various objects (e. g., animals, vehicles) on the video display as well as to rotate objects, resize objects, and play sounds that are associated with the objects. Your project manager has specified that all objects in the application should use a common interface for drawing, rotating, resizing, and playing sounds, and that these interfaces should be reusable for other application projects as well. Some future applications will need to make sounds, some will need drawing capability, some will need rotating capability, some will need resizing capability, and some will need all capabilities. A method called drawObject() will be used for drawing objects, a method called rotateObject() will be used for rotating objects, a method called resizeObject() will be used for resizing objects, and a playSound() method will be used for playing sounds.1. Design the interface classes Drawable, Rotatable, Resizable and Sounds.2. Develop a program called ManipulateAnimals that does the following: An Animal class will be used to model some basic characteristics of animals for the application. An animal will have a name attribute and methods to set the name and get the name. Animals can make sounds and are drawable, rotatable, and resizable. A Vehicle class will be used to model some basic characteristics of vehicles. A vehicle will have a name and an age, and methods to get/set these attributes. Vehicles can also make sounds and are drawable, rotatable, and resizable. Create a collection of 2 vehicles and 2 animals stored in the same array. Loop through the array and execute the drawObject(), rotateObject(), resizeObject(), and playSound() methods polymorphically for each element in the array. The drawObject() method should simply display the message "Drawing a Vehicle" or "Drawing an Animal"; the rotateObject() method should display the message "Rotating a Vehicle" or "Rotating an Animal"; and the playSound() method should display the message "Animal sound" or "Vehicle sound", depending upon the type of element that is in the array. The resizeObject() method should display "Resizing a Vehicle" or "Resizing an Animal".

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 03:00, seddy86
Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". any value that is the same as the immediately preceding value is considered a consecutive duplicate. in this example, there are three such consecutive duplicates: the 2nd and 3rd 5s and the second 6. note that the last 3 is not a consecutive duplicate because it was preceded by a 7. write some code that uses a loop to read such a sequence of non-negative integers , terminated by a negative number. when the code finishes executing, the number of consecutive duplicates encountered is printed. in this case, 3 would be printed. assume the availability of a variable, stdin, that references a scanner object associated with standard input. that is, stdin = new scanner(system. in); is given.
Answers: 1
image
Computers and Technology, 22.06.2019 08:00, luclaymom805
Aplan to budget time for studying and activities is referred to as a study routine. study habits. study skills. a study schedule.
Answers: 1
image
Computers and Technology, 22.06.2019 09:30, eiza666
My mom and i are moving and we don’t have wifi for the next week, i want to know if using a using a hotspot with unlimited data is better than using regular wifi. i’m considering cost, speed, and data sacrifices.
Answers: 1
image
Computers and Technology, 22.06.2019 20:00, BreadOfTheBear
What statement best describes operating systems? it’s possible for modern computers to function without operating systems. most operating systems are free or very inexpensive. operating systems are managed by the computer’s microprocessor (cpu). operating systems manage the computer’s random access memory (ram).
Answers: 1
You know the right answer?
Imagine your project team is developing a Java application that will serve as an educational tool to...

Questions in other subjects:

Konu
Advanced Placement (AP), 07.09.2020 07:01
Konu
Chemistry, 07.09.2020 07:01
Konu
Mathematics, 07.09.2020 07:01