Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A UML diagram in DIA would be much appreciated. Assignment 3 tests your basic knowledge of classes and objects (Chapter 3). Design a class called

A UML diagram in DIA would be much appreciated.
Assignment 3 tests your basic knowledge of 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 exact1 fields:
Field Description
name This field holds the name of the pet
type This field holds the type of animal that the pet is age This field holds the age of the pet (in years) weight This field holds the weight of the pet
color This field holds the color of the pet
Example of values
Spot, Fluffy
dog, cat, bird, fish, rabbit, turtle 1, 9
16.5, 3.0
orange, brown
The YourNamePet class should also have the following exact2 (name and functionality) methods:
Method
setName getName setType getType setAge getAge setWeight getWeight setColor getColor
Description
This method stores a value in the name field This method returns the value of the name field This method stores a value in the type field
This method returns the value of the type field This method stores a value in the age field
This method returns the value of the age field This method stores a value in the weight field This method returns the value of the weight field This method stores a value in the color field
This method returns the value of the color field
Once you have designed the class, design a program/project/driver class (the program/project/driver class file should be called Assignment3.java; replace YourName with your actual name) that creates an object of the Pet class and prompt the user to enter (in a descriptive/user-friendly way3) the name, type, age, sound, weight, and color, of his or her pet. This data should be stored in the object using the corresponding Set methods. Use the objects accessor Get methods to retrieve the data from the object (the pets name, type, age, weight, and color) and confirm them by printing them out. You will need to add the class YourNamePet to the YourNameAssignmen3 project and add
your code to the project/driver class main method.
Create the UML diagram for the 2 classes using either Dia or Microsoft Word ad add it to a Microsoft Word document
called YourNameAssignment3-UML.docx. If you use Dia, please paste a screenshot of your diagram in the document.
Create a Microsoft Word document called YourNameAssignment3-Screenshots.docx (replace YourName with your actual name) that contains screenshots of the editor window showing the entire JAVA source code for both YourNameAssignment3 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.
Submit YourNameAssignment3.java, YourNamePet.java, YourNameAssignment3-UML.docx, and YourNameAssignment3-Screenshots.docx on eCampus under the Assignment 3. Do not archive the files (e.g. no RAR, ZIP, etc.) or submit other types/formats of files (e.g. no CLASS, PDF, etc.).
Follow the Assignment Code Convention.
1 Use the exact names (spelling, caps). You are not going to earn any credit if the classes do not contain your actual name and the fields do not have the exact/precise names.
2 Use the exact names (spelling, caps). You are not going to earn any credit if the classes do not contain your actual name and the methods do not have the exact/precise names and functionality.
3 For example, a message like Please enter the age of your pet or Please enter an integral number representing the age of your pet: would allow the user to know what they should enter in a user-friendly way.
A UML diagram using DIA would be much appreciated.
image text in transcribed
image text in transcribed
image text in transcribed
ASSIGNMENT 3 Assignment 3 tests your basic knowledge of classes and objects (Chapter 3). Design a class called YourNamePet the class file should be called YourNamePet.java: replace YourName with your actual namel, with the following exact' fields: The YaurNamepet class chesuld alen have the folliwine exart? iname and functionalitul methades Once you have designed the class, design a program/project/driver class (the program/project/driver class file should be called YourNameAssignment3,jave: replace YourName with your actual name) that creates an object of the YourNamePet class and prompt the user to enter (in a descriptive/user-friendly way?) the name, type, age, sound, weight, and color, of his or her pet. This data should be stored in the object using the corresponding Set methods. Use the object's accessor Get methods to retrieve the data from the object (the pet's name, type, age, weight, and color) and confirm them by printing them out. You will need to add the class YourNamePet to the YourNameAssignmen3 project and add your code to the project/driver class main method. Create the UML diagram for the 2 classes using either Dia or Microsoft Word ad add it to a Microsoft Word document called YourNomeAssignment3-UML-docx. If you use Dia, please paste a screenshot of your diagram in the document. Create a Microsoft Word document called YourNameAssignment3-Screenshots,docx (replace YourName with your actual name) that contains screenshots of the editor window showing the entire IAVA source code for both YourNomeAssignment3 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. Submit YourNameAssignment3.java, YounNamePet.java. YourNameAssignment 3-UML.docx, and YourNameAssignment3-Screenshots. docx on eCampus under the Assignment 3. Do not archive the files (e.g. no RAR, ZIP, etc.) or submit other types/formats of files (e.g. no CLASS, PDF, etc.). Follow the Assignment Code Convention. 'Use the exact names (spelling, caps). You are not going to earn any credit if the classes do not contain your actual name and the fields do not have the exact/precise names. "Use the exact names (spelling, caps). You are not going to earn any credit if the classes do not contain vour actual name and the methods do not have the exact/precise names and functionality. - For example, a message like "Pease enfer the age of your pet " or "Phease enter an integroi number representing the age of your pet. " would allow the user to know what they should enter in a user friendly way. Your code should be well-documented. Every line of code should be preceded by a comment or a lavadoc comment explaining exactly what that line of code is doing. Every class should have a davadoc comment with the - Iratalia (veraion] */ Method Metion Every other line of code fdeciaration, initialization. astigment, function call, ete), should be preceded by a of code regular comment explaining what that line of code is doing. One of the 2 formats: Your code should be well-documented. Every line of code should be preceded by a comment or a lavadoc comment explaining exactly what that line of code is doing

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

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions

Question

Describe voluntary benefits.

Answered: 1 week ago

Question

Describe the major job evaluation systems.

Answered: 1 week ago