ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 4 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 02 May 2017 My Price 9.00

flow charts and pseudocode

Having difficulty writing this program please help. 

See attached for parameters 

 

 

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. 5% Only submit the .java files needed to make the program run. Do not submit the .class files or any other files. Style Components Include properly formatted prologue, comments, indenting, and other style elements as shown in Chapter 2 starting page 64 and Appendix 5 page 881-­892. 5% 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. 30% • 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. 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

Attachments:

Answers

(11)
Status NEW Posted 02 May 2017 06:05 AM My Price 9.00

-----------

Attachments

file 1493706605-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)