Question: i am working on constructors in java and I can't seem to make it all work Run Debug Profile Team Tools Window Help config> 237.8/353.OMB



![16 17 18 0 public static void main(String[] args) { 19 Worcate](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f63ed6acdd3_97466f63ed64478c.jpg)
Run Debug Profile Team Tools Window Help config> 237.8/353.OMB petVetStudent.java x petvetConstructor.java Source Hstory 7 8 package com.java24hours: 9 10 ** 11 12 Bauthor chave 13 14 15 public class petvetstodent 16 17 18 0 public static void main(String[] args) { 19 Worcate data base of pets 20 String [] initNames - (Wurty", "Seruy", "Butty", "Tufty"): 22 String [] initType = "cat", "Doc", "BA", Lizard"; 22 int arrayLength - initNames.length: 24 25 myPet Il pets - newsy Pet(arrayLength]; 26 27 20 29 30 31 32 33 34 35 38 tos (nt - 0 XERAYLength: ++) com eva2hours.petettudent o u Profile Team Tools Window Help 251.7/353.0MB dent.java Delvet Constructor X tory call construtor... WOTE must have a constructor for type and an OVERLOADED Constructor for type, age for (int x = 0; i > of Run Debug Profile Team Tools Window Help at config> 252.7/353.OMB petVetStudent.java X petvetConstructor.java X Source History 10 4 and open the template in the editor. 5 */ 6 package com.java24hours: class my Pet 77 variable for ticat constructo 9 String pName: 10 String pType: int pet: 12 String Ol petVet - Katty", "Douglas", "Bernie", "Laura: 13 int vetList - petvet.length: 14 15 16 17 18 bold contructor for yet to come name, type and age 19 D my Pet (String petName, String petType) 20 plome - petName: 21 pType - petType: 22 23 I. 24 my Pet (String petName, string pet Type, int pecage) 26 Name - petName: 27 Type - pet Type: 20 25 30 31 32 public void whichVet with that.ptype.toUppercase () as com javashours.mypet o Run Debug Profile Team Tools Window Help fig> 259.7/353.0MB petvetStudent.javax petvetConstructor.java urce History B 9 40 public void whichVet() { 32 switch (this.pType.toUpperCase()) 33 34 case "Ylurry": 35 System.out.println("Fluffy the Cat will see Vet Katty"): 36 break; 37 36 case Sorutry 39 System.out.println("Sarufry the Dog will see Vet Douglas): 40 break; 41 case "Burty": 43 System.out.println("Borty the Bat will see vet Bernie"): 44 break; 48 49 40 case "Torty: System.out.println mit the Teasd will se vor Lira break: I SO 51 52 53 default: System.out.println("zo break: SE 57 com.java-houset o
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
