Oop assignment | IT145 | Southern New Hampshire University

[ad_1]

 Files are in the attachment if unable to view.

Overview

Nearly every Java application involves multiple classes. For this assignment, you will work on a Dog application composed of three classes. The Dog and Corgi classes have been started for you; you will complete these classes and create the Driver class from scratch. The application will be used to collect and print details about specific dogs. As you can see from the UML class diagram on this page, the Corgi class (child/subclass) inherits from the Dog class (parent/superclass). In the Corgi class file definition, the “extends” keyword is used to establish that it inherits from the Dog class.

Prompt

For this assignment, you will complete the Dog application by completing the Dog and Corgi classes and creating the Driver class. Use the Uploading Files to Eclipse and the Downloading Files From Eclipse tutorials to help you with this project.

  1. Open the Virtual Lab by clicking on the link in the Virtual Lab Access module. Then open your IDE and upload the DogApp.zip folder containing the Dog and Corgi class files. You will be creating a Driver class in the same project folder. When you upload the files, you will see errors due to the classes being incomplete. As you complete each class, any errors should resolve.

  1. Complete the Dog class:
    1. Using the UML Class diagram to the right, declare the class variables. A text version is available: UML Class Diagram Text Version.
    2. Create a constructor that incorporates the type, breed, and name variables (do not include topTrick).
      Note: The type refers to what the breed typically does; for example, a corgi would be a “cattle herding dog.” A Shiba Inu would be a “hunting dog.”
    3. Create the setTopTrick() mutator method.
  2. Complete the Corgi class:
    1. Using the UML Class diagram, declare the class variables.
    2. Create the two mutator methods for the class variables.
  3. Make sure to select the Project folder, then add a new class. Name it the Driver class, then create the code:
    1. There should be no class variables.
    2. The main() method will be the only method in the class.
    3. Write three lines of code in the main() method:
      1. Instantiate a corgi object using the below syntax:
        className objectName = new className(input parameters)TIP: Refer to the constructors in the Dog and Corgi classes to ensure the input parameters are correct.
      2. Use the objectName.setTopTrick() method to set a top trick for the dog you created.
      3. Embed the objectName.toString() method in a statement that outputs to the console window.
  4. Once you have completed the code for the Dog and Corgi classes and created a Driver class, right-click the Project folder and select Run As, then Java Application. You should see output in the Console window that resembles the sample below. Your results will vary based on your input values.

Sample Output

DOG DATA
Java is a Pembroke Welsh Corgi, a cattle herding dog.
The top trick is: ringing the bell to go outside.
The Corgi is 5 years old and weighs 38 pounds. 

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Australia Assessments
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Criminal Justice
this is an excellent paper
Customer 454221, April 3rd, 2020
SEO
A job well done. Followed the instructions to the letter.
Customer 463679, April 24th, 2023
Business
Quality work. Looking forward to your future contributions.
Customer 463467, December 2nd, 2022
English 101
Good work.
Customer 456823, May 15th, 2022
Statistics
super professional
Customer 462485, May 17th, 2022
IT
A few mistakes but overall an excellent paper
Customer 453915, September 13th, 2022
Automotive
Excellent writing.
Customer 452441, April 26th, 2022
Other
This paper was beautifully written, and I am truly thankful to customer service for ensuring that I received a quality paper.
Customer 452455, May 19th, 2023
Business and administrative studies
Great effort.
Customer 452615, May 19th, 2022
Healthcare & Medical
Good work!
Customer 452441, August 6th, 2022
Business
Good
Customer 463473, November 1st, 2022
Psychology
Excellent response.
Customer 462579, June 4th, 2022
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat