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

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Matlab question: use switch and anythe lottery game matches three different integer numbers between 1 and 10. winning depends on how many matching numbers are provided by a player. the player provides three different integers between 1 and 10.if there is a match of all 3 numbers, the winning $ 1000.if there is a match with 2 numbers, the winning $ 10.if there is a match of all with 1 numbers, the winning $ 1.with no match, the winning is $0.write a function lottery3 that checks three numbers provided by a player and determine the winning amount. if the user mistakenly enters same number twice/thrice and if that number matches one of the winning numbers, the code should count that number only once and display correct result. the player doesn’t have to guess the order of numbers.the input to the function lottery3 can have up to two input arguments. the first input argument is a row array numbers with 3 numbers. if the second argument input testcode is present, and is a row vector of 3 values, the function lottery3 uses the code in testcode as the three winning numbers (the test must be three different integer numbers between 1 and 10), else three different numbers will be automatically generated by testcode.the ouput should return the variable winnings and the three winning numbers in the row array winnumbers.hint: make use of the internal function any.restriction: the function must use switch-case statements to determine the winning.example #1: winning = lottery3( [1,2,1],[1,2,3])produceswinning =10example #2: [winning,winnumbers] = lottery3( [1,2,3])produceswinning =3winnumbers =8 5 3
Answers: 1
question
Computers and Technology, 22.06.2019 01:00
Program description: a c# app is to be created to produce morse code. the morse code assigns a series of dots and dashes to each letter of the alphabet, each digit, and a few special characters (such as period, comma, colon, and semicolon). in sound-oriented systems, the dot represents a short sound and the dash represents a long sound. separation between words is indicated by a space, or, quite simply, the absence of a dot or dash. in a sound-oriented system, a space is indicated by a short period of time during which no sound is transmitted. the international version of the morse code is stored in the data file morse.txt.
Answers: 3
question
Computers and Technology, 22.06.2019 17:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best suited for this?
Answers: 2
question
Computers and Technology, 23.06.2019 00:10
Write a function so that the main0 code below can be replaced by the simpler code that calls function mphandminutes tomiles0. original main0 int main) l double milesperhour-70.0; double minutestraveled = 100.0; double hourstraveled; double milestraveled; hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; cout < "miles" 2 using namespace std; 4 /* your solution goes here/ 6 int maino 1 test passed 7 double milesperhour 70.0 all tests passed 8 double minutestraveled 100.0; 10 cout < < "miles: " < < mphandminutestomiles(milesper-hour, minutestraveled) < < endl; 12 return 0; 13
Answers: 1
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
question
Geography, 30.10.2020 01:00
question
Geography, 30.10.2020 01:00
question
Mathematics, 30.10.2020 01:00
question
Spanish, 30.10.2020 01:00
Questions on the website: 13722363