1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vichka [17]
4 years ago
10

Define a method printAll() for class PetData that prints output as follows with inputs "Fluffy", 5, and 4444. Hint: Make use of

the base class' printAll() method. Name: Fluffy, Age: 5, ID: 4444
Computers and Technology
1 answer:
Vsevolod [243]4 years ago
3 0

Answer and Explanation:

public class petData

{

private int ageYears;

private String fullName;

private int IdNumber;

public void setName (String givenName)

{

fullName = givenName;

return;

}

public void setAge (int numYears)

{

ageYears = numYears;

return;

}

public void setID (int numID)

{

IdNumber = numID;

return;

}

public void printAll ()

{

System.out.print ("Name: " + fullName);

System.out.print (", Age: " + ageYears);

return;

}

}

From the above, we have defined a class petData, with methods setName, setAge, printAll. These methods all make use of the string variable fullName and integer variable ageYears. From the above, setName method sets fullName variable to name given to its string parameter givenName while setAge method does the same with the ageYears variable in initializing it. This is also done by the ID method. These variables are then used by printAll method in printing out the Name and age of the object which would be created with the petData class

E. g: petData dog= new petData();

You might be interested in
What is the purpose of a title slide? A) To add titles to each slide B) To introduce the presentation C) To describe the resolut
makvit [3.9K]

B) To introduce the presentation

5 0
3 years ago
Read 2 more answers
What is the largest place value in a 12 bit binary number?
azamat
The largest binary number that can be expressed with 12 bits is all 1s, which means 1 followed by 1 followed by 1, up to 12 times.
6 0
3 years ago
Drag the tiles to the correct boxes to complete the pairs.
lianna [129]

Answer:

software

client devices

hardware

Explanation:

Plzzzzzzzzzzzzz give me brainiest

4 0
3 years ago
URGENT!!!!
MA_775_DIABLO [31]
"Solve the problem: on the first day in a garden thrived with p% more flowers than in the previous day. Determine the total number of flowers that will bloom in the k days." What I translated. 

We would need to know the other answers before anyone could answer. There was completely no number given. 


8 0
3 years ago
Which site was launched by Ben t Smith iv
Kryger [21]

He launched the site "Wanderful Media".

5 0
3 years ago
Other questions:
  • What is the primary purpose of a business plan? To file for incorporation To help you identify your goals and plan how you will
    6·1 answer
  • When using a graphics editing program, which option allows you to adjust the space around an image?
    15·1 answer
  • In python:
    8·1 answer
  • How many electrons are there in an atom of carbon? A. Four B. Eight C. Six D. One
    15·2 answers
  • BRALYEST TO FIRST PERSON THAT IS CORRECT!!! Select the correct navigational path to add titles to your printable worksheet. Clic
    9·2 answers
  • Who where the romanovs? What happened to them ?
    7·1 answer
  • Unicode is a world standard to represent _________________
    10·1 answer
  • Convert 3BA.25 (base 14) to base 6 ? Show all arithmetic in decimal
    5·1 answer
  • In what ways can information be slanted in a news report? List at least five ways.
    5·2 answers
  • The capacity of your hand drive is measured in​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!