Explore key aspects of C# programming in 'Unit 7 CP2 Programming' quiz. Engage with questions about methods, their usage, and declarations, enhancing your understanding of method accessibility, return types, and the structure of C# methods. Ideal for learners aiming to deepen their programming skills.
Can be called without referring to an object
Cannot be copied
Can be called only once
Cannot require parameters
Rate this question:
Unlimited
Public
Shared
Unrestricted
Rate this question:
Accessibility
Parameter type
Return Type
Scope
Rate this question:
A pair of parentheses
the type of the parameter
A local name for the parameter
An initial value for the parameter
Rate this question:
Return type
Parameter list
Body
Closing curly brace
Rate this question:
Reference
Value
Alias
Orientation
Rate this question:
Hours = CalcPay();
hours = Main.CalcPay();
Pay = CalcPay(hoursWorked);
Pay = CalcPay(hours);
Rate this question:
Scope management
selective ignorance
Privacy
Implementation hiding
Rate this question:
AMethod(int 55);
AMethod(myAge);
AMethod(int myAge);
AMethod();
Rate this question:
a statement of purpose
Declared accessibility
The static modifier
A return type
Rate this question:
Public static void CalcSum(double fi rstValue, double secondValue)
Public static void CalcSum(double price1, double price2)
Both of these are correct.
None of these are correct
Rate this question:
Methods are easily reusable.
Because all methods must be stored in the same class, they are easy to find.
Th e Main() method becomes more detailed
All of these are true
Rate this question:
Formal
Actual
Proposed
Preferred
Rate this question:
Public static void CalcDifference(double price1, price2)
Public static void CalcDifference(double price1, double price2)
Both of these are correct.
None of these are correct.
Rate this question:
Only the method isRateOK() executes.
Only the method isQuantityOK() executes
Both methods execute.
Neither method executes.
Rate this question:
Must contain a declared double named rate
Might contain a declared double named rate
Cannot contain a declared double named rate
Cannot contain any declared double variables
Rate this question:
Salary
Any legal identifi er other than salary
Any legal identifi er
omitted
Rate this question:
Only the method isRateOK() executes.
Only the method isQuantityOK() executes.
Both methods execute.
Neither method executes.
Rate this question:
Declared accessibility
a nonstatic modifier
Multiple return types
parameters separated by dots
Rate this question:
Quiz Review Timeline (Updated): Mar 21, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.