Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions In this project, you will use the information on Wikipedia s List of Fictional Dogs in Animated Television to create a literal object, a

Instructions
In this project, you will use the information on Wikipedias List of Fictional Dogs in Animated Television to create a literal object, a constructor, add a method to the object, and display the values. For each task, use comments to label steps as needed. Group comments whenever possible to keep the code readable.
Pick a favorite animal from Wikipedia's List of Fictional Dogs in Animated Television and create a literal object named myDog. Use the properties provided on the Wikipedia page to define an object using an object literal.
In addition to the properties on the List of Fictional dogs, include a property you name mySound that stores what the dog might say to describe how it sounds. This will be text to represent their personality. If they are a mean dog their sound might be when you hear me you should be scared, if they are a big dog they might be I sound very intimidating because of my size, if they are a tiny dog, they might sound like you might not be scared, but you should be!. Use your imagination here to mimic what the character might say.
Display the dogs name included in a message to the user that describes the dog using each property. For example, for the dog Astro from The Jetsons:
COP1801_Mod5_Assignment1.JPG
For an accessible version of the image, download the following Word Document file.
COP1801_Mod5_Assignment1.docx
Now create another dog object called myDogConst using a simple constructor. Use the same information you used to create the object literal. This time add a new property named canTalk and give it a true or false value. Create an object method called myGreeting (a method is a function stored in an object) as one of the properties. When the objects method is called, the method would display a greeting that displays the information below:
COP1801_Mod5_Assignment2.JPG
For an accessible version of the image, download the following Word Document file.
COP1801_Mod5_Assignment2.docx
Call the objects method to display the myGreeting message for the object.

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

Students also viewed these Databases questions

Question

Question 1 (a2) What is the reaction force Dx in [N]?

Answered: 1 week ago

Question

5. Explain how ERISA protects employees pension rights.

Answered: 1 week ago