• Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
  • Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand
  • OverflowAI GenAI features for Teams
  • OverflowAPI Train & fine-tune LLMs
  • Labs The future of collective knowledge sharing
  • About the company Visit the blog

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Get early access and see previews of new features.

Dog Class Java Assignment

I am a Java programming student and busy with an assignment. I would really appreciate some help.

Below is the class I had to create:

Below is the tester program I created:

All works fine but I am really stuck on how to set the boosterShot to true or false in the tester program.

Any help will be greatly appreciated.

Yuri H's user avatar

  • 1 Indenting code will be part in the next programming course? –  Tom Commented Jun 11, 2017 at 13:36
  • my apologies tom –  Brent Cloete Commented Jun 11, 2017 at 13:45

4 Answers 4

You can use this. Try to ask if dog is Boostershot or not

Tom's user avatar

  • Thank you Shane, works well. Only issue is that if you type yes it request Yes or No and if I type Yes then it gets a error –  Brent Cloete Commented Jun 11, 2017 at 14:23
  • Ok I see the error is not from your code, after a wrong answer it goes to the next question. –  Brent Cloete Commented Jun 11, 2017 at 14:26
  • How would I implement something like this:a program that reads in five pets of type Dog and displays the name and breed of all dogs that are over two years old and have not had their booster shots –  Brent Cloete Commented Jun 11, 2017 at 17:03
  • after you input the five pets thats the time you display the dog info that are over two years? –  Shaine Commented Jun 11, 2017 at 17:06
  • yes once 5 pets are read into the program, the program must then return all the pets along with name and breed over 2 years who have not had a booster shot. I have the 5 pets read in but struggle to write code to display only the pets over 2 years who dont have a booster shot. –  Brent Cloete Commented Jun 11, 2017 at 18:51
Try to put For loop. looping five time then put all dogs that is 2 years above and booster= false in a Dog List

import java.util.LinkedList;

import java.util.List;

import java.util.Scanner;

public class Sample{

Robert Heavner's user avatar

One possibility:

a.setBoosterShot(true);

Aydin K.'s user avatar

Your Answer

Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more

Sign up or log in

Post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged java or ask your own question .

  • Featured on Meta
  • Announcing a change to the data-dump process
  • We've made changes to our Terms of Service & Privacy Policy - July 2024

Hot Network Questions

  • How to make an operator form of Part[] to use with // (Postfix)
  • How will a very short undergrad impact PhD applications?
  • Does a simple and intuitive theory have better chances of being true?
  • How to reinstall a ceiling fan that fell out of ceiling?
  • BIO 2021 Q3a: Window Dressing (BFS in C++)
  • When non-resident US citizens vote, which state does their vote count for wrt the electoral college?
  • Do I have legal grounds against a book by an ex which depicts private details of my life, including some false events, without permission?
  • NDSolve gets the wrong answer! How get NDSolve to correctly solve this "stiff" equation?
  • Substitute for saltpetre
  • Are there non-religious variants of moral realism that defend the existence of objectively evil thoughts, intentions, and desires?
  • What is the color of the final disc(s)?
  • How can I handle unavailable papers in a systematic literature review?
  • Formal way to state that a condition is true for a certain number of elements of a set.
  • Semisimplicity for representations of a compact group
  • Is the coulomb unit a constant or does it depend on the wire
  • Can I restrict which users can `sendmail` from an address with Postfix?
  • "Man cannot live by bread alone." — Is there any logical explanation why this idiom doesn't have an article before "man"?
  • Did the BBC ask for extra line spacing?
  • is there any way to add amps to a vintage battery charger using an additional transformer?
  • sisl: AttributeError: 'BandStructure' object has no attribute 'eigh'
  • Between two variables with weak correlations and no significant prediction rate from simple regression, what are the next research steps?
  • What does “teletext” exactly refer to in BBC Micro specifications?
  • How do I know when I have sufficiently mastered a right hand speed drill for accordion?
  • Minerals in asteroids that can only be detected indirectly

it 145 2 3 assignment write a class

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications You must be signed in to change notification settings

Collection of my work done in IT145 at SNHU.

kylereddoch/IT145-Java

Folders and files.

NameName
37 Commits
production/IT145-Java production/IT145-Java

Repository files navigation

Hello 👋, i'm kyle.

Written in Java

These are the scripts that I created while in my Java class (IT-145) at SNHU.

All Challenge Activities and Labs are from the zyBooks program. The Class Assignments and Projects are what is turned in via the online learning systems.

If you have found these to be helpful, please consider sponsoring my work or donating.

Challenge Activities

There are quite a few challenges in each chapter and quite a few chapters. You can find the challenges at the following link:

Find the Challenge Activities Here

Lab 1.37 Asks the user for an integer. Then outputs the users input, then outputs it squared, then cubed. Asks the user for another integer and takes both integers and finds the sum and product. Outputs the sum and product.

Lab 1.38 Asks the user for an integer, double, character, and string. Outputs the inputs in the following order: integer, double, character, string. Then outputs the inputs in the following order: string, character, double, integer. Then casts the double to an integer and outputs the integer.

Lab 2.17 Write a method drivingCost() with input parameters milesPerGallon, dollarsPerGallon, and milesDriven that returns the dollar cost to drive those miles. Define that method in a program whose inputs are the car's miles per gallon and the price of gas in dollars per gallon (both doubles). Output the gas cost for 10 miles, 50 miles, and 400 miles, by calling your drivingCost() method three times.

Lab 3.35 This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defined by user specified arrow base height, arrow base width, and arrow head width.

Lab 3.36 Given a line of text as input, output the number of characters excluding spaces, periods, exclamation points, or commas.

Lab 4.5 Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array's numbers on one line, each number followed by one space. Also output the total weight, by summing the array's elements. Also output the average of the array's elements. Also output the max array element.

Online Shopping Cart This consisted of editing two different .java files. These are in the OnlineShoppingCart folder.

Class Assignments

I wrote both the Dog.java class and the Cat.java class for a reference for anyone who may need to use the classes.

Note: Both the Dog.java class and the Cat.java class are in the PetBAG package folder as they are part of the PetBAG project later in the class.

Dog.java class

Preliminary work for a local pet boarding and grooming business (PetBAG). Developing a Pet.java class based on the UML diagram.

Project Two

Work done for Grazioso Salvare, an international search and rescue animal company. Developed the Monkey.java class based on the UML diagram. Edited the Driver.java class to display the start menu, handle user input, handle validation, and take appropriate actions based on the user input.

Sponsor this project

  • https://buymeacoffee.com/kylereddoch
  • Java 100.0%

Logo

  • Turnitin Guides
  • Turnitin in an LMS
  • D2L (Brightspace)
  • Assignment management
  • Creating an assignment in Feedback Studio using D2L LTI 1.3

These instructions are for D2L LTI 1.3 integrations.

For information on how to set up an assignment using the V2 integration, visit D2L's Assignments and Turnitin page for K-12 or Higher Ed .

  • Navigate to the course you would like to add Turnitin to.
  • Select the Content tab.

D2L_AddExistingActivities.png

  • Select the relevant account for this registration using the radio buttons.

LTI13_CreateAssignment.png

  • Select  Submit .

For more information about assignment settings, see the assignment settings and additional assignment settings guidance.

D2L_RestrictionsTab.png

Articles in this section

  • Creating a Handwritten Assignment in D2L LTI 1.3
  • Using the Turnitin Assignment Copy tool in Feedback Studio with D2L LTI 1.3
  • LMS course copy recommendations for Feedback Studio in D2L
  • Editing an assignment in Feedback Studio using D2L LTI 1.3
  • Assignment settings in Feedback Studio for D2L LTI 1.3
  • Using the Assignment Inbox in Feedback Studio with D2L LTI 1.3
  • Submitting on behalf of a student in Feedback Studio for D2L LTI 1.3
  • Using the Analytics Dashboard with D2L LTI 1.3
  • D2L LTI 1.1 to 1.3 migration FAQ for Feedback Studio instructors

IMAGES

  1. Solved Task 01 Implement The Following Uml Class Diag

    it 145 2 3 assignment write a class

  2. Assignment 2-3 Write a Class

    it 145 2 3 assignment write a class

  3. [Solved] Find ddxx4 ddxx4

    it 145 2 3 assignment write a class

  4. 2024 SNHU IT-145 module 2-3 Assignment Write a Class Southern New

    it 145 2 3 assignment write a class

  5. [Solved] Using a conditional expression write a statement that

    it 145 2 3 assignment write a class

  6. IT

    it 145 2 3 assignment write a class

VIDEO

  1. Assignment Writing jobs work from home || Online paise Kaise Kamaye 2024

  2. BEGE 145 solved assignment 2023-24 / bege 145 solved assignment 2024 / bege 145 assignment 2023-2024

  3. bece 145 solved assignment 2023-24 || bece 145 solved assignment 2024 in English || bece 145 english

  4. bege 145 solved assignment 2023-24 // Soft Skills // #bege145 #bege145_ignou #bege @meet_ignou

  5. bece 145 solved assignment 2023-24 || bece 145 solved assignment 2024 in Hindi || bece 145 in Hindi

  6. Creating dog/cat java file for assignment

COMMENTS

  1. 2-3 Assignment

    It-145 7-3 assignment Using Java API Documentation; Dad 220 module 7 project 2 ... 1-6 Milestone- Pseudocode and Flowchart; Preview text. IT 145 2-3 Assignment: Write a Dog Class package com; public class Dog {private int dogSpaceAvailable; private dogWeight; private boolean dogGrooming; ... 2-3 Assignment: W rite a Dog.java Class. package com ...

  2. SNHU_IT-145/2-3_Write_A_Class/Pet.java at master

    Pet.java. Cannot retrieve latest commit at this time. History. Code. Blame. 100 lines (73 loc) · 1.63 KB. public class Pet { private String petType; private String petName; private int petAge; private String catSpace; // there is no indication what data catSpace represents so I just guessed that string would be ok private String dogSpace ...

  3. Dog Class Java Assignment

    I am a Java programming student and busy with an assignment. I would really appreciate some help. Below is the class I had to create: * Class for basic dog data: name, age, weight, breed and booster shot info. */. private String name; //name of dog. private int age; //in years. private double weight; //in pounds.

  4. Collection of my work done in IT145 at SNHU.

    Module 2 We implemented either the Dog.java class or the Cat.java class based on the specifications in the UML Class diagram.. I wrote both the Dog.java class and the Cat.java class for a reference for anyone who may need to use the classes. Note: Both the Dog.java class and the Cat.java class are in the PetBAG package folder as they are part of the PetBAG project later in the class.

  5. 2-3 Assignment Write a Class

    2-3 Assignment_ Write a Class. Course. Foundation in Application Development (IT145) 542 Documents. Students shared 542 documents in this course. University ... IT 145 4-3 Project One Global Rain Summary Report Template Chad Archer; IT 145 Global Rain Project One; IT-145 1-6 Milestone Pseudocode and Flowchart;

  6. IT145

    IT 145 Lab 3.36 Count Input Length Without Spaces, Periods, Exclamation Points, or Commas. Assignments 100% (9) 3. Assignment 2-3 Write a Class. Assignments 100% (3) 4. IT 145 Week 2 Mod 2.17 Zybooks LAB Driving Cost - Methods. Assignments 75% (12) New. 6. 1-6 Milestone Pseduocode and Flowchart.

  7. Question: IT-145 2-3 WRITE A CLASS

    Question: IT-145 2-3 WRITE A CLASS. IT - 1 4 5 2 - 3 WRITE A CLASS. Here's the best way to solve it. Powered by Chegg AI. Share Share.

  8. Solved Instant Feedback Tool: 2-3 Assignment: Write a Class

    Solution: Instant Feedback Tool: 2-3 Assignment: Write a Class Listen Get instant feedback on your assignment prior to submitting it to your instructor for grading. Write a Dog java Class Feedback: Tell me how well my program meets the assignment requirements. Write a Cat java Class Feedback Tell me how well my program meets the assignment ...

  9. IT 145 Week 2 Mod 2.9 Zybooks Using a Class

    IT 145 2-3 Assignment Write a Class. Foundation in Application Development 100% (18) 4. IT-145 Summary Report 3-1. Foundation in Application Development 100% (14) 2. Pet - Code for java class,Pet file. Foundation in Application Development 100% (11) 3. Walter Lawrence Global Rain Summary Report.

  10. 2024 SNHU IT-145 module 2-3 Assignment Write a Class Southern ...

    2024 SNHU IT-145 module 2-3 Assignment Write a Class Southern New Hampshire University. 2024 SNHU IT-145 module 2-3 Assignment Write a Class Southern New Hampshire University. 100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached. Previously searched by you.

  11. Is my spacing off? This is for IT-145 Assignment 2-3 : r/SNHU

    Thanks so much. I seriously appreciate it. Paste the code between code 3 of this ` each side. for 2-3 you don't have to do the whole Pet UML diagram, just the dog or cat. Cat one was like 20 lines for me including comments. Make sure you include comments, it is a part of the grade. Aw I see.

  12. IT-145 Project 2 Java Class Files

    Project 2 Java class files copied to word for reference. Includes Corgi, Dog, and Driver Class files. ... Class files are complete to assignment criteria. 100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached. Previously searched by you. ... IT-145 Project 2 Java Class Files $3.98 Add to cart ...

  13. IT145 Project 2Backup

    Pseudocode IT145 - Assignment; 3.2 Detecting equal values with branches; 6-1 Disscusion - Course work and material; Dog Stay - UML class diagrams are useful tools for mapping out different classes for an; 6-3 Assignment - Module 6; IT-145 1-6 Milestone Cydni Vinton

  14. Creating an assignment in Feedback Studio using D2L LTI 1.3

    Editing an assignment in Feedback Studio using D2L LTI 1.3; Assignment settings in Feedback Studio for D2L LTI 1.3; Using the Assignment Inbox in Feedback Studio with D2L LTI 1.3; Submitting on behalf of a student in Feedback Studio for D2L LTI 1.3; Using the Analytics Dashboard with D2L LTI 1.3; D2L LTI 1.1 to 1.3 migration FAQ for Feedback ...