We are writing a paper and the teacher requested we add this: In your paper, you
ID: 3547544 • Letter: W
Question
We are writing a paper and the teacher requested we add this: In your paper, you must also write a short program using pseudocode that consist of two classes. The first class will be the main program. It will use an object to access some function(s) in the second class. The second class will perform some function for the main class. I do not care what your program does as long as it is properly written. The program does not have to be long or complex. It is in your best interest to keep the classes short. As always, proper indentation, commenting, etc. are expected.
Here's an example of how our code is to be formatted this was a long one, but the one requested needs not be so thourough:
Start
Initialize()
Main()
FinishUp()
Stop
Initialize() // Let the user decide when to start
declarations
string go
endDeclarations
output
Explanation / Answer
Class1{
BeginClass
Main(){
BeginMethod
Declaration
Class2 obj; //create object of Class2
int number;
EndDeclaratons
output "obj.AddOneMethod(number)"
return
EndMethod
}
EndClass
}
Class2{
BeginClass
AddOneMethod(number){
BeginMethod
return number+1;
EndMethod
}
EndClass
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.