SlideShare a Scribd company logo
1 of 8
Download to read offline
Buy here:
http://student.land/cs-151-unit-6-assignment/
Unit 6 Assignment
Grading Information: This Program is due on Date Specified.
Comments are REQUIRED flow charts and pseudocode are NOT REQUIRED.
Directions Points
The file must be called <LastInitialFirstInitialUnit6.java> (driver)
<LastInitialFirstInitialPets.java> (handles variables and methods for the Pet
Class)
Proper coding conventions required the first letter of the class start with a
capital letter and the first letter of each additional word start with a capital
letter.
Only submit the .java files needed to make the program run. Do not submit
the .class files or any other files.
5%
Style Components 5%
Include properly formatted prologue, comments, indenting, and other style
elements as shown in Chapter 2 starting page 64 and Appendix 5 page
881-892.
Topics covered in chapter
Topics with * are covered in this assignment. Ensure you use every item
listed below with an * in your completed assignment.
*Object Oriented Programming *Driver Class
Calling Objects, this reference *Instance Variables
Tracing
UML
*Local Variables
*The return statement
*Argument Passing
*Specialized Methods – *Accessor, *Mutator, and Boolean Methods
Problem Solving with Simulation (optional)
Basic Guidelines
You will be making a very basic Pet Tracker. You will be tracking type,
name, age, etc and outputting some information at the end.
LiFiUnit6.java (driver)
Provide a driver class that has the following items:
• Creates 3 instances of your LiFiUnit6Pets class. You may use a loop but it
is
not required.
60%
● Gets input for first type, name as String. Notice in the example how the prompts
change once the name has been entered.
● Get input for age as integer.
● Get input for weight as double.
● Get input for isMale as Boolean.
● For the 1st pet, use the default constructor and use proper mutator methods to
set all variables.
● For the 2nd pet, use a single parameter constructor that accepts type as an
argument and use proper mutator methods for all other values.
● For the 3rd pet, use a constructor that accepts all values as arguments.
● Create a class method (in your driver), that counts the number of dogs and the
number of cats. It is recommended you create one method called countPets that
accepts the pet instance, type, and 0 as a constant for number. This method
should return the number of the pet set to it. This method is required but how it
works is up to you.
● After counting the pets, if you have 1 or more dogs and 1 or more cats, output “I
sure hope the cats and dogs get along”.
● Call displayPet method from your Pets class.
LiFiPets.java
Provide a pets class that has accessor/mutator methods for all variables
pertaining to the pets above.
• Create a method called displayPet and output the values for all pets, see
sample below. Ensure to output “Male” or “Female” based on isMale. Cal
lthis method for each pet.
Sample output is provided below. Be sure to mimic it exactly except for
values entered.
30%
NOTE: Complete your activity and upload to assignment.
Total Percentage 100%
Sample
Notice how once the name is input, the name is used in the
following prompts.
The below example has 2 dogs and 1 cat so notice the output
about hoping the pets get along.
Welcome to the Java Pet Tracker.
Please enter the type of Pet #1 (Dog or Cat): Dog
Please enter the name of Pet #1: Max
Please enter the age of Max: 3
Please enter the weight of Max in pounds (example 5.2): 85.2 Is Max Male (true/false): true
Please enter the type of Pet #2 (Dog or Cat): Dog
Please enter the name of Pet #2: Buddy
Please enter the age of Buddy: 4
Please enter the weight of Buddy in pounds (example 5.2): 75.6 Is Buddy Male (true/false):
true
Please enter the type of Pet #3 (Dog or Cat): Cat
Please enter the name of Pet #3: CiCi
Please enter the age of CiCi: 10
Please enter the weight of CiCi in pounds (example 5.2): 10.6 Is CiCi Male (true/false):
false
Calculating Pet Population and Stuff
I sure hope them cats and dogs get along!
Pet Registration Information: Type: Dog
Name: Max
Age: 3
Weight: 85.2 Sex: Male
Type: Dog Name: Buddy Age: 4 Weight: 75.6 Sex: Male
Type: Cat Name: CiCi Age: 10 Weight: 10.6 Sex: Female
The below examples is of all Cat’s so notice no statement
about hoping they get along.
Welcome to the Java Pet Tracker.
Please enter the type of Pet #1 (Dog or Cat): Cat
Please enter the name of Pet #1: CiCi
Please enter the age of CiCi: 10
Please enter the weight of CiCi in pounds (example 5.2): 10.7 Is CiCi Male (true/false):
false
Please enter the type of Pet #2 (Dog or Cat): Cat
Please enter the name of Pet #2: Zeus
Please enter the age of Zeus: 2
Please enter the weight of Zeus in pounds (example 5.2): 7.6 Is Zeus Male (true/false): true
Please enter the type of Pet #3 (Dog or Cat): Cat
Please enter the name of Pet #3: Strawberry
Please enter the age of Strawberry: 2
Please enter the weight of Strawberry in pounds (example 5.2): 11.6 Is Strawberry Male
(true/false): false
Calculating Pet Population and Stuff
Pet Registration Information: Type: Cat
Name: CiCi
Age: 10
Weight: 10.7 Sex: Female
Type: Cat Name: Zeus Age: 2 Weight: 7.6 Sex: Male
Type: Cat
Name: Strawberry Age: 2
Weight: 11.6 Sex: Female
Type a description for this product here...

More Related Content

Viewers also liked

Por la integración de las personas con discapacidad
Por la integración de las personas con discapacidadPor la integración de las personas con discapacidad
Por la integración de las personas con discapacidadeclipse69
 
Awareness for sustainable action
Awareness for sustainable actionAwareness for sustainable action
Awareness for sustainable actionSarah Verwei
 
iCheck_Hồ sơ năng lực_04082016
iCheck_Hồ sơ năng lực_04082016iCheck_Hồ sơ năng lực_04082016
iCheck_Hồ sơ năng lực_04082016Mạnh Hà Vũ
 
Define polis derecho soberania y vasallaje
Define polis derecho soberania y vasallajeDefine polis derecho soberania y vasallaje
Define polis derecho soberania y vasallajesusumaru
 
Representación matricial del simplex pdf
Representación matricial del simplex pdfRepresentación matricial del simplex pdf
Representación matricial del simplex pdfmauricioeviana
 
3 florencia gcollection
3 florencia gcollection3 florencia gcollection
3 florencia gcollectionspclass
 
Buisness News
Buisness News Buisness News
Buisness News PUSHP
 

Viewers also liked (12)

La tecnologia y la construccion
La tecnologia y la construccionLa tecnologia y la construccion
La tecnologia y la construccion
 
Mtu 2011-17
Mtu 2011-17Mtu 2011-17
Mtu 2011-17
 
Por la integración de las personas con discapacidad
Por la integración de las personas con discapacidadPor la integración de las personas con discapacidad
Por la integración de las personas con discapacidad
 
Gaceta marzo
Gaceta marzoGaceta marzo
Gaceta marzo
 
Awareness for sustainable action
Awareness for sustainable actionAwareness for sustainable action
Awareness for sustainable action
 
iCheck_Hồ sơ năng lực_04082016
iCheck_Hồ sơ năng lực_04082016iCheck_Hồ sơ năng lực_04082016
iCheck_Hồ sơ năng lực_04082016
 
Myspace
MyspaceMyspace
Myspace
 
Define polis derecho soberania y vasallaje
Define polis derecho soberania y vasallajeDefine polis derecho soberania y vasallaje
Define polis derecho soberania y vasallaje
 
Twitter Diana
Twitter DianaTwitter Diana
Twitter Diana
 
Representación matricial del simplex pdf
Representación matricial del simplex pdfRepresentación matricial del simplex pdf
Representación matricial del simplex pdf
 
3 florencia gcollection
3 florencia gcollection3 florencia gcollection
3 florencia gcollection
 
Buisness News
Buisness News Buisness News
Buisness News
 

Similar to Cs 151 unit 6 assignment

In this project you will define some interfaces, abstract classes, a.pdf
In this project you will define some interfaces, abstract classes, a.pdfIn this project you will define some interfaces, abstract classes, a.pdf
In this project you will define some interfaces, abstract classes, a.pdffathimaoptical
 
Can someoen help me to write c++ program including C++ inheritance, .pdf
Can someoen help me to write c++ program including C++ inheritance, .pdfCan someoen help me to write c++ program including C++ inheritance, .pdf
Can someoen help me to write c++ program including C++ inheritance, .pdfarrowvisionoptics
 
The purpose of this project is to give students more exposure to obje.pdf
The purpose of this project is to give students more exposure to obje.pdfThe purpose of this project is to give students more exposure to obje.pdf
The purpose of this project is to give students more exposure to obje.pdfforwardcom41
 
Application Animal Characteristics In today’.docx
           Application Animal Characteristics In today’.docx           Application Animal Characteristics In today’.docx
Application Animal Characteristics In today’.docxhallettfaustina
 
1_1_python-course-notes-sections-1-7.pdf
1_1_python-course-notes-sections-1-7.pdf1_1_python-course-notes-sections-1-7.pdf
1_1_python-course-notes-sections-1-7.pdfJavier Crisostomo
 
My Program below this is supposed to do the following below here but.pdf
My Program below this is supposed to do the following below here but.pdfMy Program below this is supposed to do the following below here but.pdf
My Program below this is supposed to do the following below here but.pdfarihantelehyb
 
All programming assignments should include the name, or names, of th.pdf
All programming assignments should include the name, or names, of th.pdfAll programming assignments should include the name, or names, of th.pdf
All programming assignments should include the name, or names, of th.pdffashioncollection2
 
Hub102 - JS - Lesson3
Hub102 - JS - Lesson3Hub102 - JS - Lesson3
Hub102 - JS - Lesson3Tiểu Hổ
 
DOES NOT NEED TO BE ANSWERED UNTIL NOV 13thWords AssignmentRober.pdf
DOES NOT NEED TO BE ANSWERED UNTIL NOV 13thWords AssignmentRober.pdfDOES NOT NEED TO BE ANSWERED UNTIL NOV 13thWords AssignmentRober.pdf
DOES NOT NEED TO BE ANSWERED UNTIL NOV 13thWords AssignmentRober.pdfarchanaemporium
 
Polymorphism.ppt
Polymorphism.pptPolymorphism.ppt
Polymorphism.pptEmanAsem4
 
The Java Script Programming Language
The  Java Script  Programming  LanguageThe  Java Script  Programming  Language
The Java Script Programming Languagezone
 
Javascript by Yahoo
Javascript by YahooJavascript by Yahoo
Javascript by Yahoobirbal
 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming LanguageRaghavan Mohan
 
Les origines de Javascript
Les origines de JavascriptLes origines de Javascript
Les origines de JavascriptBernard Loire
 
UNIT 1- RELATIONAL DATABASE DESIGN USING PLSQL.pdf
UNIT 1- RELATIONAL DATABASE DESIGN USING PLSQL.pdfUNIT 1- RELATIONAL DATABASE DESIGN USING PLSQL.pdf
UNIT 1- RELATIONAL DATABASE DESIGN USING PLSQL.pdfKavitaShinde26
 
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docx
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docxCMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docx
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docxmary772
 
1)When describing my ethnicity, I have a tendency to describe myse.docx
1)When describing my ethnicity, I have a tendency to describe myse.docx1)When describing my ethnicity, I have a tendency to describe myse.docx
1)When describing my ethnicity, I have a tendency to describe myse.docxmonicafrancis71118
 

Similar to Cs 151 unit 6 assignment (20)

In this project you will define some interfaces, abstract classes, a.pdf
In this project you will define some interfaces, abstract classes, a.pdfIn this project you will define some interfaces, abstract classes, a.pdf
In this project you will define some interfaces, abstract classes, a.pdf
 
Can someoen help me to write c++ program including C++ inheritance, .pdf
Can someoen help me to write c++ program including C++ inheritance, .pdfCan someoen help me to write c++ program including C++ inheritance, .pdf
Can someoen help me to write c++ program including C++ inheritance, .pdf
 
The purpose of this project is to give students more exposure to obje.pdf
The purpose of this project is to give students more exposure to obje.pdfThe purpose of this project is to give students more exposure to obje.pdf
The purpose of this project is to give students more exposure to obje.pdf
 
Application Animal Characteristics In today’.docx
           Application Animal Characteristics In today’.docx           Application Animal Characteristics In today’.docx
Application Animal Characteristics In today’.docx
 
1_1_python-course-notes-sections-1-7.pdf
1_1_python-course-notes-sections-1-7.pdf1_1_python-course-notes-sections-1-7.pdf
1_1_python-course-notes-sections-1-7.pdf
 
My Program below this is supposed to do the following below here but.pdf
My Program below this is supposed to do the following below here but.pdfMy Program below this is supposed to do the following below here but.pdf
My Program below this is supposed to do the following below here but.pdf
 
All programming assignments should include the name, or names, of th.pdf
All programming assignments should include the name, or names, of th.pdfAll programming assignments should include the name, or names, of th.pdf
All programming assignments should include the name, or names, of th.pdf
 
Hub102 - JS - Lesson3
Hub102 - JS - Lesson3Hub102 - JS - Lesson3
Hub102 - JS - Lesson3
 
PHP Classes and OOPS Concept
PHP Classes and OOPS ConceptPHP Classes and OOPS Concept
PHP Classes and OOPS Concept
 
Ma3696 lecture 4
Ma3696 lecture 4Ma3696 lecture 4
Ma3696 lecture 4
 
DOES NOT NEED TO BE ANSWERED UNTIL NOV 13thWords AssignmentRober.pdf
DOES NOT NEED TO BE ANSWERED UNTIL NOV 13thWords AssignmentRober.pdfDOES NOT NEED TO BE ANSWERED UNTIL NOV 13thWords AssignmentRober.pdf
DOES NOT NEED TO BE ANSWERED UNTIL NOV 13thWords AssignmentRober.pdf
 
Polymorphism.ppt
Polymorphism.pptPolymorphism.ppt
Polymorphism.ppt
 
The Java Script Programming Language
The  Java Script  Programming  LanguageThe  Java Script  Programming  Language
The Java Script Programming Language
 
Javascript by Yahoo
Javascript by YahooJavascript by Yahoo
Javascript by Yahoo
 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming Language
 
Javascript
JavascriptJavascript
Javascript
 
Les origines de Javascript
Les origines de JavascriptLes origines de Javascript
Les origines de Javascript
 
UNIT 1- RELATIONAL DATABASE DESIGN USING PLSQL.pdf
UNIT 1- RELATIONAL DATABASE DESIGN USING PLSQL.pdfUNIT 1- RELATIONAL DATABASE DESIGN USING PLSQL.pdf
UNIT 1- RELATIONAL DATABASE DESIGN USING PLSQL.pdf
 
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docx
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docxCMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docx
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docx
 
1)When describing my ethnicity, I have a tendency to describe myse.docx
1)When describing my ethnicity, I have a tendency to describe myse.docx1)When describing my ethnicity, I have a tendency to describe myse.docx
1)When describing my ethnicity, I have a tendency to describe myse.docx
 

More from AbrahamNolitos

BI 101 Week 5 Homework
BI 101 Week 5 HomeworkBI 101 Week 5 Homework
BI 101 Week 5 HomeworkAbrahamNolitos
 
BI 101 Week 2 Experiment Answer Sheet
BI 101 Week 2 Experiment Answer SheetBI 101 Week 2 Experiment Answer Sheet
BI 101 Week 2 Experiment Answer SheetAbrahamNolitos
 
AC 309 Unit 2 Chapter Problems
AC 309 Unit 2 Chapter ProblemsAC 309 Unit 2 Chapter Problems
AC 309 Unit 2 Chapter ProblemsAbrahamNolitos
 
A researcher hypothesizes that people who listen to classical music have high...
A researcher hypothesizes that people who listen to classical music have high...A researcher hypothesizes that people who listen to classical music have high...
A researcher hypothesizes that people who listen to classical music have high...AbrahamNolitos
 
Problems within supply chains
Problems within supply chainsProblems within supply chains
Problems within supply chainsAbrahamNolitos
 

More from AbrahamNolitos (15)

BI 101 Week 5 Homework
BI 101 Week 5 HomeworkBI 101 Week 5 Homework
BI 101 Week 5 Homework
 
BI 101 Week 2 Experiment Answer Sheet
BI 101 Week 2 Experiment Answer SheetBI 101 Week 2 Experiment Answer Sheet
BI 101 Week 2 Experiment Answer Sheet
 
BI 101 Unit 4 Quiz
BI 101 Unit 4 QuizBI 101 Unit 4 Quiz
BI 101 Unit 4 Quiz
 
BI 101 Unit 6 Quiz
BI 101 Unit 6 QuizBI 101 Unit 6 Quiz
BI 101 Unit 6 Quiz
 
BI 101 Unit 5 Quiz
BI 101 Unit 5 QuizBI 101 Unit 5 Quiz
BI 101 Unit 5 Quiz
 
BI 101 Homework 8
BI 101 Homework 8BI 101 Homework 8
BI 101 Homework 8
 
BI 101 Unit 3 Quiz
BI 101 Unit 3 QuizBI 101 Unit 3 Quiz
BI 101 Unit 3 Quiz
 
BI 101 Unit 2 Quiz
BI 101 Unit 2 QuizBI 101 Unit 2 Quiz
BI 101 Unit 2 Quiz
 
BI 101 Unit 1 Quiz
BI 101 Unit 1 QuizBI 101 Unit 1 Quiz
BI 101 Unit 1 Quiz
 
BI 101 Homework 5
BI 101 Homework 5BI 101 Homework 5
BI 101 Homework 5
 
Apollo and Daphne
Apollo and DaphneApollo and Daphne
Apollo and Daphne
 
BI 101 Homework 3
BI 101 Homework 3BI 101 Homework 3
BI 101 Homework 3
 
AC 309 Unit 2 Chapter Problems
AC 309 Unit 2 Chapter ProblemsAC 309 Unit 2 Chapter Problems
AC 309 Unit 2 Chapter Problems
 
A researcher hypothesizes that people who listen to classical music have high...
A researcher hypothesizes that people who listen to classical music have high...A researcher hypothesizes that people who listen to classical music have high...
A researcher hypothesizes that people who listen to classical music have high...
 
Problems within supply chains
Problems within supply chainsProblems within supply chains
Problems within supply chains
 

Recently uploaded

Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...lizamodels9
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024christinemoorman
 
rishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfrishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfmuskan1121w
 
2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis UsageNeil Kimberley
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Roomdivyansh0kumar0
 
Marketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet CreationsMarketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet Creationsnakalysalcedo61
 
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...lizamodels9
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...lizamodels9
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...lizamodels9
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechNewman George Leech
 
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | DelhiFULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | DelhiMalviyaNagarCallGirl
 
Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756
Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756
Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756dollysharma2066
 
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...lizamodels9
 
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...lizamodels9
 
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,noida100girls
 
Catalogue ONG NUOC PPR DE NHAT .pdf
Catalogue ONG NUOC PPR DE NHAT      .pdfCatalogue ONG NUOC PPR DE NHAT      .pdf
Catalogue ONG NUOC PPR DE NHAT .pdfOrient Homes
 

Recently uploaded (20)

Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024
 
rishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfrishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdf
 
2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage
 
Best Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting PartnershipBest Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting Partnership
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
 
Marketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet CreationsMarketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet Creations
 
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman Leech
 
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCREnjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
 
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | DelhiFULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
 
Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756
Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756
Call Girls In ⇛⇛Chhatarpur⇚⇚. Brings Offer Delhi Contact Us 8377877756
 
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
 
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
 
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
 
Catalogue ONG NUOC PPR DE NHAT .pdf
Catalogue ONG NUOC PPR DE NHAT      .pdfCatalogue ONG NUOC PPR DE NHAT      .pdf
Catalogue ONG NUOC PPR DE NHAT .pdf
 

Cs 151 unit 6 assignment

  • 1. Buy here: http://student.land/cs-151-unit-6-assignment/ Unit 6 Assignment Grading Information: This Program is due on Date Specified. Comments are REQUIRED flow charts and pseudocode are NOT REQUIRED. Directions Points The file must be called <LastInitialFirstInitialUnit6.java> (driver) <LastInitialFirstInitialPets.java> (handles variables and methods for the Pet Class) Proper coding conventions required the first letter of the class start with a capital letter and the first letter of each additional word start with a capital letter. Only submit the .java files needed to make the program run. Do not submit the .class files or any other files. 5% Style Components 5%
  • 2. Include properly formatted prologue, comments, indenting, and other style elements as shown in Chapter 2 starting page 64 and Appendix 5 page 881-892. Topics covered in chapter Topics with * are covered in this assignment. Ensure you use every item listed below with an * in your completed assignment. *Object Oriented Programming *Driver Class Calling Objects, this reference *Instance Variables Tracing UML *Local Variables *The return statement *Argument Passing
  • 3. *Specialized Methods – *Accessor, *Mutator, and Boolean Methods Problem Solving with Simulation (optional) Basic Guidelines You will be making a very basic Pet Tracker. You will be tracking type, name, age, etc and outputting some information at the end. LiFiUnit6.java (driver) Provide a driver class that has the following items: • Creates 3 instances of your LiFiUnit6Pets class. You may use a loop but it is not required. 60% ● Gets input for first type, name as String. Notice in the example how the prompts change once the name has been entered. ● Get input for age as integer. ● Get input for weight as double. ● Get input for isMale as Boolean. ● For the 1st pet, use the default constructor and use proper mutator methods to set all variables.
  • 4. ● For the 2nd pet, use a single parameter constructor that accepts type as an argument and use proper mutator methods for all other values. ● For the 3rd pet, use a constructor that accepts all values as arguments. ● Create a class method (in your driver), that counts the number of dogs and the number of cats. It is recommended you create one method called countPets that accepts the pet instance, type, and 0 as a constant for number. This method should return the number of the pet set to it. This method is required but how it works is up to you. ● After counting the pets, if you have 1 or more dogs and 1 or more cats, output “I sure hope the cats and dogs get along”. ● Call displayPet method from your Pets class. LiFiPets.java Provide a pets class that has accessor/mutator methods for all variables pertaining to the pets above. • Create a method called displayPet and output the values for all pets, see sample below. Ensure to output “Male” or “Female” based on isMale. Cal lthis method for each pet. Sample output is provided below. Be sure to mimic it exactly except for values entered. 30% NOTE: Complete your activity and upload to assignment.
  • 5. Total Percentage 100% Sample Notice how once the name is input, the name is used in the following prompts. The below example has 2 dogs and 1 cat so notice the output about hoping the pets get along. Welcome to the Java Pet Tracker. Please enter the type of Pet #1 (Dog or Cat): Dog Please enter the name of Pet #1: Max Please enter the age of Max: 3 Please enter the weight of Max in pounds (example 5.2): 85.2 Is Max Male (true/false): true Please enter the type of Pet #2 (Dog or Cat): Dog Please enter the name of Pet #2: Buddy Please enter the age of Buddy: 4 Please enter the weight of Buddy in pounds (example 5.2): 75.6 Is Buddy Male (true/false): true
  • 6. Please enter the type of Pet #3 (Dog or Cat): Cat Please enter the name of Pet #3: CiCi Please enter the age of CiCi: 10 Please enter the weight of CiCi in pounds (example 5.2): 10.6 Is CiCi Male (true/false): false Calculating Pet Population and Stuff I sure hope them cats and dogs get along! Pet Registration Information: Type: Dog Name: Max Age: 3 Weight: 85.2 Sex: Male Type: Dog Name: Buddy Age: 4 Weight: 75.6 Sex: Male Type: Cat Name: CiCi Age: 10 Weight: 10.6 Sex: Female The below examples is of all Cat’s so notice no statement about hoping they get along. Welcome to the Java Pet Tracker. Please enter the type of Pet #1 (Dog or Cat): Cat Please enter the name of Pet #1: CiCi Please enter the age of CiCi: 10
  • 7. Please enter the weight of CiCi in pounds (example 5.2): 10.7 Is CiCi Male (true/false): false Please enter the type of Pet #2 (Dog or Cat): Cat Please enter the name of Pet #2: Zeus Please enter the age of Zeus: 2 Please enter the weight of Zeus in pounds (example 5.2): 7.6 Is Zeus Male (true/false): true Please enter the type of Pet #3 (Dog or Cat): Cat Please enter the name of Pet #3: Strawberry Please enter the age of Strawberry: 2 Please enter the weight of Strawberry in pounds (example 5.2): 11.6 Is Strawberry Male (true/false): false Calculating Pet Population and Stuff Pet Registration Information: Type: Cat Name: CiCi Age: 10 Weight: 10.7 Sex: Female Type: Cat Name: Zeus Age: 2 Weight: 7.6 Sex: Male Type: Cat Name: Strawberry Age: 2
  • 8. Weight: 11.6 Sex: Female Type a description for this product here...