Answered step by step
Verified Expert Solution
Link Copied!

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 1
Assignment 1 tests your basic knowledge of basic Java concepts (Chapter 1 and 2) and classes and objects (Chapter 3).
Design a class called YourNamePet (the class file should be called YourNamePet.java; replace YourName with your actual name),
with the following exact ?1 fields, methods, and functionality, in this order:
Design a driver class called YourNameAssignment1(replace 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 descriptive/user-friendly way ?2) the name, type, color, age, and weight of his/her/their pet, and
read the 5 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 a(n) COLOR TYPE named NAME. In December 2023, 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 YourNameAssignment1(same name as the driver
class), add the class YourNamePet to the YourNameAssignment1 project and add your code to the YourNamePet class and
YourNameAssignmen1 project/driver class main method. Your program should be user-friendly (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
well-documented/commented (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 YourName-Assignment1.docx (replace YourName with your actual name) with your
screenshots of the NetBeans editor window showing the entire JAVA source code for both YourNameAssignment1 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 YourName-Assignment1.docx on eCampus under the Assignment 1. Do not archive the files (e.g. no
RAR, ZIP, etc.) or submit other types/formats of files (e.g. 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.
image text in transcribed

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 Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions

Question

1. Give occasional take-home tests.

Answered: 1 week ago

Question

3. How can we confi rm both ourselves and others?

Answered: 1 week ago

Question

2. In what ways can confl ict enrich relationships?

Answered: 1 week ago