subject
Computers and Technology, 02.08.2021 20:10 memeE15

We are in the midst of designing the Cat class. We have already created a class diagram and written most of the pseudocode for the Cat class, which contains attributes for the name of the cat and the gender of the cat, as shown below. +Cat -name: String -gender: Character +Cat() +getName(): String +setName(new Name: String) +getGender(): Character +setGender(newGender: Character) +inputCatData(Ref catFile: InputFile)
Class Cat
Private String name
Private Character gender
Public Module Cat()
Set name = " "
Set gender = ' '
End Module
Public Module setName(String newName)
Set name = newName
End Module
Public Function String getName()
Return name
End Function
Public Module setGender (Character newGender)
If newGender == 'F' OR newGender == 'M' Then
Set gender = newGender
Else
Display "Error: only M or F is allowed for gender, not: ", newGender
Set gender = ' '
End If
End Module
Public Function Character getGender()
Return gender
End Function
Public Module inputCatData(InputFile Ref catFile)
Write this statement
End Module
End Class
Type the exact text for the line of the pseudocode to replace Write this statement, which is the statement that inputs the data for a Cat object from the catFile. The file contains, on each line, the name of the cat, then the gender of the cat.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 23:10, Tatertotzzzz
Write a method that accepts a string object as an argument and returns the number of words it contains. for instance, if the argument is "four score and seven years ago", the method should return the number 6. demonstrate the method in a program that asks the user to input a string and then passes that string into the method, printing out whatever the method returns.
Answers: 3
image
Computers and Technology, 22.06.2019 05:30, xbeatdroperzx
Gerard is currently working as an entry-level customer support technician, but he would like to someday become a software developer. what is the best first step to understand what he should do? ask his manager for a new job or at least a job recommendation study graphic design in order to obtain the necessary skills use career resources to investigate what skills and education are required work part-time as an entry-level web developer question 13 (true/false worth 6 points) (08.03 lc) career resources are used to explore career options and find career information. true false question 14(multiple choice worth 6 points) (08.01 mc) classify the following skills: writing html code, evaluating color theory, using design principles. hard skills interpersonal skills people skills soft skills question 15 (true/false worth 6 points) (08.03 lc) a mentor is a person who is advised, trained, or counseled by a trusted mentee. true false
Answers: 2
image
Computers and Technology, 23.06.2019 09:10, djs1671
(328 inc. 448 ind. 480 in25. john has a collection of toy cars. he has 2 red cars, 4 blue cars, 4 black cars, and 6 yellowcars. what is the ratio of red cars to yellow cars? a. 1: 2b. 1: 3c. 1: 626. the net of a right triangular prism is shown below.
Answers: 2
image
Computers and Technology, 23.06.2019 13:00, dimondqueen511
Which one of the following voltages should never be measured directly with a vom? a. 1200 v b. 500 v c. 800 v d. 100v
Answers: 2
You know the right answer?
We are in the midst of designing the Cat class. We have already created a class diagram and written...

Questions in other subjects:

Konu
Mathematics, 30.08.2019 02:40