Download presentation
Presentation is loading. Please wait.
1
Welcome back to Software Development!
2
Method Review Access modifier Method name
Return type Input variables (comma separated) public string GetAnswer( string questionToAsk , bool hitEnterIsOk) { string userAnswer; Console.Write( questionToAsk ); userAnswer = Console.ReadLine(); return userAnswer; }
3
Method Review Access modifier Method name
Return type Input variables (comma separated) public string GetAnswer( string questionToAsk , bool hitEnterIsOk) { string userAnswer; Console.Write( questionToAsk ); Body of the method userAnswer = Console.ReadLine(); (algorithm code) return userAnswer; }
4
Method Review Access modifier Method name
Return type Input variables (comma separated) public string GetAnswer( string questionToAsk , bool hitEnterIsOk) { string userAnswer; Console.Write( questionToAsk ); Body of the method userAnswer = Console.ReadLine(); (algorithm code) return userAnswer; }
5
Method Review Access modifier Method name
Return type Input variables (comma separated) public string GetAnswer( string questionToAsk , bool hitEnterIsOk) { string userAnswer; Console.Write( questionToAsk ); Body of the method userAnswer = Console.ReadLine(); (algorithm code) return userAnswer; }
6
Method Review Access modifier Method name
Return type Input variables (comma separated) public string GetAnswer( string questionToAsk , bool hitEnterIsOk) { string userAnswer; Console.Write( questionToAsk ); Body of the method userAnswer = Console.ReadLine(); (algorithm code) return userAnswer; }
7
Method Review Access modifier Method name
Return type Input variables (comma separated) public string GetAnswer( string questionToAsk , bool hitEnterIsOk) { string userAnswer; Console.Write( questionToAsk ); Body of the method userAnswer = Console.ReadLine(); (algorithm code) return userAnswer; }
8
Method Review Access modifier Method name
Return type Input variables (comma separated) public string GetAnswer( string questionToAsk , bool hitEnterIsOk) { string userAnswer; Console.Write( questionToAsk ); Body of the method userAnswer = Console.ReadLine(); (algorithm code) return userAnswer; }
9
Method Review Access modifier Method name
Return type Input variables (comma separated) public string GetAnswer( string questionToAsk , bool hitEnterIsOk) { string userAnswer; Console.Write( questionToAsk ); Body of the method userAnswer = Console.ReadLine(); (algorithm code) return userAnswer; }
10
Method Review Access modifier Method name
Return type Input variables (comma separated) public string GetAnswer( string questionToAsk , bool hitEnterIsOk) { string userAnswer; Console.Write( questionToAsk ); Body of the method userAnswer = Console.ReadLine(); (algorithm code) return userAnswer; }
11
Method Review Access modifier Method name
Return type Input variables (comma separated) public string GetAnswer( string questionToAsk , bool hitEnterIsOk) { string userAnswer; Console.Write( questionToAsk ); Body of the method userAnswer = Console.ReadLine(); (algorithm code) return userAnswer; }
12
Method Review Access modifier Method name
Return type Input variables (comma separated) public string GetAnswer( string questionToAsk , bool hitEnterIsOk) { string userAnswer; Console.Write( questionToAsk ); Body of the method userAnswer = Console.ReadLine(); (algorithm code) return userAnswer; }
13
Method Review Access modifier Method name
Return type Input variables (comma separated) public string GetAnswer( string questionToAsk , bool hitEnterIsOk) { string userAnswer; Console.Write( questionToAsk ); Body of the method userAnswer = Console.ReadLine(); (algorithm code) return userAnswer; }
14
Method Quiz
15
Sharing code made easy…
16
More Encapsulation Stuff Coming Our Way
17
More Encapsulation Stuff Coming Our Way
Method Overloading (Monday)
18
More Encapsulation Stuff Coming Our Way
Method Overloading (Monday) Constructors (Tuesday)
19
More Encapsulation Stuff Coming Our Way
Method Overloading (Monday) Constructors (Tuesday) Inheritance (Wednesday)
20
More Encapsulation Stuff Coming Our Way
Method Overloading (Monday) Constructors (Tuesday) Inheritance (Wednesday) Polymorphism (Wednesday)
21
Method Overloading
22
Method Overloading Multiple versions of a method
23
Method Overloading Multiple versions of a method
Only difference is the input variable(s)
24
Method Overloading Multiple versions of a method
Only difference is the input variable(s) Everything else is the same.
25
Overloading a method in your Critter class
26
Overloading a method in your Critter class
Pick a method in your Critter class
27
Overloading a method in your Critter class
Pick a method in your Critter class Create an overloaded version of it.
28
Overloading a method in your Critter class
Pick a method in your Critter class Create an overloaded version of it. Use both versions of the method in your Critter program.
29
Overloading a method in your Critter class
Pick a method in your Critter class Create an overloaded version of it. Use both versions of the method in your Critter program. Example:
30
Overloading a method in your Critter class
Pick a method in your Critter class Create an overloaded version of it. Use both versions of the method in your Critter program. Example: Feed() // normal amount of food
31
Overloading a method in your Critter class
Pick a method in your Critter class Create an overloaded version of it. Use both versions of the method in your Critter program. Example: Feed() // normal amount of food Feed(int howMuch) // owner decides how much food
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.