how can if fix this error cat cannot be resolved to a type below is the
Fantastic news! We've Found the answer you've been seeking!
Question:
how can if fix this error "cat cannot be resolved to a type "
below is the code :
Transcribed Image Text:
+ to Package Explorer X 1 JRE System Library [JavaSE-18] src Week1 ¡cus1156fall2022lab1-singh x Cat.java CatManager.java Lab1Driver.java x SimpleTest.java .... 0 Hamster.java *Cat.java X *CatManager.... *Lab1Driver.... *SimpleTest.... 4 5 * fun 6 BankAccount.... BankAccount... package cus1156fall2022-singh; /** * This class represents one cat. A cat has a * name and a color and can meow one or more times * @author Bonnie MacKellar 7 */ 8 9 public class Cat{ 10 11 private String name; private String color; 12 13 /** 14 15 */ 16 * create a Cat with no name or color public Cat() 17 { } 18 19 20 /** 21 22 * @param name * @param color 24 */ 25 26 * Create a Cat with the specified name and color the color of the Cat public Cat(String name, String color) { this.name = name; the name of the Cat 27 this.color = color; } 29 30 private void meow () { /** } System.out.println("Meow!"); * The Cat prints outs its name and meows the specified * number of times * @param howMany - the number of times to meow */ public void manyMeows (int howMany) { /** } System.out.println(name + int count=0; while (count++ < howMany) meow(); * Prints out the name of the Cat */ public void printMyName() { /** } says "); System.out.println("my name is " + name); * returns the name of the Cat * @return the name of the Cat */ public String getName() { return name; 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 0 1 0 * Sets the name of the Cat to the specified name * @param name - the name of the Cat public void setName(String name){ this.name = name; returns the color of the Cat * @return the color of the Cat public String getColor() { return color; 56 57 58 59 60 } 61 62 /** 63 64 65 */ 66 67 68 } 69 700 /** 71 72 73 */ 740 75 76 } 77 78 /** 79 80 81 */ 82 83 84 } 85 } 86 * sets the color of the Cat to the specified color * @param color the color of the Cat public void setColor(String color) { this.color = color; Writable Smart Insert 1:25:24 極 க G + to Package Explorer X 1 JRE System Library [JavaSE-18] src Week1 ¡cus1156fall2022lab1-singh x Cat.java CatManager.java Lab1Driver.java x SimpleTest.java .... 0 Hamster.java *Cat.java X *CatManager.... *Lab1Driver.... *SimpleTest.... 4 5 * fun 6 BankAccount.... BankAccount... package cus1156fall2022-singh; /** * This class represents one cat. A cat has a * name and a color and can meow one or more times * @author Bonnie MacKellar 7 */ 8 9 public class Cat{ 10 11 private String name; private String color; 12 13 /** 14 15 */ 16 * create a Cat with no name or color public Cat() 17 { } 18 19 20 /** 21 22 * @param name * @param color 24 */ 25 26 * Create a Cat with the specified name and color the color of the Cat public Cat(String name, String color) { this.name = name; the name of the Cat 27 this.color = color; } 29 30 private void meow () { /** } System.out.println("Meow!"); * The Cat prints outs its name and meows the specified * number of times * @param howMany - the number of times to meow */ public void manyMeows (int howMany) { /** } System.out.println(name + int count=0; while (count++ < howMany) meow(); * Prints out the name of the Cat */ public void printMyName() { /** } says "); System.out.println("my name is " + name); * returns the name of the Cat * @return the name of the Cat */ public String getName() { return name; 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 0 1 0 * Sets the name of the Cat to the specified name * @param name - the name of the Cat public void setName(String name){ this.name = name; returns the color of the Cat * @return the color of the Cat public String getColor() { return color; 56 57 58 59 60 } 61 62 /** 63 64 65 */ 66 67 68 } 69 700 /** 71 72 73 */ 740 75 76 } 77 78 /** 79 80 81 */ 82 83 84 } 85 } 86 * sets the color of the Cat to the specified color * @param color the color of the Cat public void setColor(String color) { this.color = color; Writable Smart Insert 1:25:24 極 க G
Expert Answer:
Answer rating: 100% (QA)
1 Missing Import Statement If Cat is a class from a different package eg mypackag... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
It would be perfectly reasonable for the Time2 class of Fig. 8.5 to represent the time internally as the number of seconds since midnight rather than the three integer values hour, minute and second....
-
Python Question needed solving is at bottom #Function implementing the Extended Euclidean Algorithm import mathdef egcd(a,b): # b must not be zero otherwise the concept of gcd will fail #base case if...
-
Fashion Fabrics makes pants from a special material. The fabric is special because of the way it fits many body types. The pants sell for $142. A well-known retail establishment has asked Fashion...
-
Evaluate the following integrals using the Fundamental Theorem of Calculus. Sx 0 x(x-2)(x-4) dx
-
Jupiter's is considering an investment in time and administrative expense on an effort that promises one large payoff in the future, followed by additional expenses over a 10-year horizon. The cash...
-
Classification of Acquisition Costs Selected accounts included in the property, plant, and equipment section of Lobo Corporations balance sheet at December 31, 2009, had the following balances. Land...
-
1) Show a calculation of both the speed and the acceleration of the stopper for the 4 Newton trial. SHOW YOUR WORK BELOW! 2) Make 2 graphs: a. Force versus speed. b. Force versus speed squared. c....
-
During the month of July, the Town of Lynton recorded the following information related to purchases Amount of Purchase Order Actual Cost General government $ 559,000 $ 499,000 Public safety 744,200...
-
Tent Master produces Pup tents and Pop-up tents. The company budgets $295,000 of overhead cost and 59,000 direct labor hours. Additional information follows. Per Unit Pup tent Pop-up tent Activity...
-
Credit can be a useful and valuable tool; but, sort of in the same way as a gun - it can easily be misused. Waiting until you have enough cash to purchase something is a great way to figure out that...
-
Consider the demand for gas in the US. Suppose that due to reading news reports that buyers expect the price of gas to rise. Please draw the demand curve for gas and the effect of this change....
-
The wavelength of a laser light is 549.2 nm in air. What is the wavelength of the laser light in a transparent medium that has an index of refraction of 2.34 in units of nm?
-
How to add the even and odd in raptor flowchart between two numbers?
-
Michelle and Rosa are researching the deepest lakes in the United States for a school project. Lake Tahoe has a depth of 1644 feet. What is the depth of the lake in meters? (3 feet = 1 yard; 1 yard ~...
-
Using your corporation's information and what you have learned in this course, develop a memo to your client, using the outline presented. Explanation of the taxpayer's business and issue at hand...
-
Problem 2. (0.6 points, 0.2 points for each question) (a) A company turns its inventory 2 times a month. Its months-of-supply = Its days-of-supply = Please show your analysis below: _months. days. (1...
-
Patty Bayan is a single taxpayer living at 543 Space Drive, Houston, TX 77099. Her Social Security number is 466-33-1234. For 2012, Patty has no dependents, and her W-2 from her job at a local...
-
Mary paid $2,000 of state income taxes in 2012. The total sales tax she paid during 2012 was $5,500, which included $3,000 for the cost of a new car. How should Mary treat the taxes paid on her 2012...
-
Your supervisor has asked you to research the following situation concerning Owen and Lisa Cordoncillo. Owen and Lisa are brother and sister. In May 2012, Owen and Lisa exchange business pickup...
-
A project developed in PL/1 is expected to take 30 months. Assuming the same ratios as those shown in the table below, compare the duration, level of effort, and software size between a project...
-
What is the difference between tabular output and zoned output?
-
Develop a questionnaire for mass employee distribution based on your findings from the previous interviews. Why are we completing the analysis with an anonymous survey?
Study smarter with the SolutionInn App