Answered step by step
Verified Expert Solution
Question
1 Approved Answer
ASSIGNMENT 1 Assignment 1 tests your basic knowledge of basic Java concepts ( Chapter 1 and 2 ) and classes and objects ( Chapter 3
ASSIGNMENT
Assignment tests your basic knowledge of basic Java concepts Chapter and and classes and objects Chapter
Design a class called YourNamePet the class file should be called YourNamePet.java; replace YourName with your actual name
with the following exact fields, methods, and functionality, in this order:
Design a driver class called YourNameAssignmentreplace YourName with your actual name with this main functionality:
Creates an object of the YourNamePet class called myPet.
Prompt the user to input in a descriptiveuserfriendly way the name, type, color, age, and weight of hishertheir pet, and
read the values and use the corresponding myPet objects' set methods to store them in the corresponding fields.
Use the object's accessor Get methods to retrieve the data from the myPet object the pet's name, type, age, weight, and color
into new variables and output them in the following message to the console replace the ALL CAPS values with the
corresponding values:
There once was an COLOR TYPE named NAME. In December at the age of AGE, NAME was WEIGHT pounds. NAME
was a happy TYPE and had a long and happy life.
Implement the classes in NetBeans IDE and JAVA: Create a JAVA project called YourNameAssignmentsame name as the driver
class add the class YourNamePet to the YourNameAssignment project and add your code to the YourNamePet class and
YourNameAssignmen projectdriver class main method. Your program should be userfriendly prompt the user for the input using
a descriptive message like "Please enter your pet's age or "Please enter an integral number representing your pet's age: and be
welldocumentedcommented have comments for every line of code
Create the screenshot document for your code and output: Create a Microsoft Word document from the YourName
AssignmentN.docx template and call it YourNameAssignmentdocx replace YourName with your actual name with your
screenshots of the NetBeans editor window showing the entire JAVA source code for both YourNameAssignment and YourNamePet
classes and the entire output. If the entire class JAVA source code or the output does not fit in one screenshot or the screenshots
cannot be easily read, create multiple screenshots and add multiple screenshots to the screenshot document. If your output is
longer than a line and does not fit on one screen, Wrap Text in your output panel.
Submit your work: Submit YourNameAssignmentdocx on eCampus under the Assignment Do not archive the files eg no
RAR, ZIP, etc. or submit other typesformats of files eg no CLASS, PDF JAVA, etc. Please take time after submitting to review the
file and check it is correct and resubmit it if there are any errors.
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