Answered step by step
Verified Expert Solution
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:
COPModAssignmentJPG
For an accessible version of the image, download the following Word Document file.
COPModAssignmentdocx
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:
COPModAssignmentJPG
For an accessible version of the image, download the following Word Document file.
COPModAssignmentdocx
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started