Question: ( ) / ( ( ) / ( ) ) main module Module main ( ) ( ) / ( ( ) / ( )

()/(()/())
main module
Module main()()/(()/())
Declare input variables
Declare String inputName, String inputType, Integer inputAge
()/(()/())
class variable to hold a pet
Declare Pet Animal
()/(()/())
create a Pet object
Set Animal = new Pet()
()/(()/())
Get values for a pet
Display Enter a pet name:
Input inputName
Animal.setName(inputName)
Display Enter a pet type:
Input inputType
Animal.setType(inputType)
Display Enter a pet age:
Input inputAge
Animal.setAge(inputAge)
()/(()/())
Show values for this pet
Display The pet name is ,Animal.getName()
Display The pet type is ,Animal.getType()
Display The pet age is ,Animal.getAge()
End Module

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!