Question: Add an optional parameter to the ShowHeroes method. Default it to 0. In the method, if the parameter has the default value, show all the
Add an optional parameter to the ShowHeroes method. Default it to 0. In the method, if the parameter has the default value, show all the heroes else show the number of heroes that match the parameter. For example, if 10 is passed in, only shows the first 10 heroes.
11 //PART C (1 #1 //art C-1: Optional - araeter 11 (1 11 #1 (1 11 A an opt o al pa aneter to the Show Heroes -etho (see part A-1. De ault 't tou. in the "et.od, the parameter has the e.at vacue o. U how all e heroes el-e how the number o. ueroes that at the para...eter. tapie, it 10 is pa e ir on., ..ow the .irt 10 heroes A
Step by Step Solution
3.51 Rating (164 Votes )
There are 3 Steps involved in it
You can modify the ShowHeroes method to include an optional parameter with a default value of 0 and ... View full answer
Get step-by-step solutions from verified subject matter experts
