Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ALL IN JAVA A) Use the code below to write down the answer to each question: a) Class header b) data fields/instance variables c) which

ALL IN JAVA image text in transcribed
image text in transcribed
A) Use the code below to write down the answer to each question: a) Class header b) data fields/instance variables c) which line creates a new puppy object d) what is the name of the new puppy object? e) What would be the output of line 18 ? 1 public class Puppy 21 3 String breed 4 String size: Sintage I 6 String color: 7 public String getPupinfo) 8 return ("Breed is: " + breed + " Size is: " + size + "Age is: " + age + "color is " + color); 10 ) 9 11 public static void main(String II args1 121 13 Puppy chihuahua new Puppy(): 10 ) 11 public static void main(String args) 12 13 Puppy chihuahua = new Puppy(); 14 chihuahua.breed = "Chihuahua", 15 chihuahua.size="Very Small", 16 chihuahua age = 2; 17 chihuahua.color = "white"; 18 System.out.println(chihuahua.getPupInfo(); 19} }

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_2

Step: 3

blur-text-image_step3

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

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

ISBN: 0619064625, 978-0619064624

More Books

Students also viewed these Databases questions