Question
1) Given the following statement, what would be the best heading for the CalculateResult( ) method? int aValue, result; result = CalculateResult(27.83, aValue); 2)Which of
1) Given the following statement, what would be the best heading for the CalculateResult( ) method? int aValue, result; result = CalculateResult(27.83, aValue);
2)Which of the following would be the most appropriate way to invoke the predefined Floor( ) method found in the Math class? The signature for the method looks like: static double Floor (double)
3) Assuming values are stored in val1 and val2, which of the following is a valid method call for FindLargestScore? void FindLargestScore(int val1, int val2)
4) Given the call to the method DetermineResult( ) shown below, which of the following would be the most appropriate heading for the method? The variable someValue is declared as an int. someValue = DetermineResult(116.3);
5) Which of the following would be a valid call to a method defined as shown below? static void DisplayInstructions( )
6) Given the following task, which would be the most appropriate method heading? A method receives three whole numbers as input. The values represent grades. They should be unchangeable in the method. The method should return the average with a fractional component.
7) Given the following task, which would be the most appropriate method heading? Results have been calculated for taxAmount and totalSales. Write a method heading that accepts these values as input for display purposes.
8) _______________ will be returned as an argument to the WriteLine( ) as output after the following call to the predefined method in the Math class? WriteLine(Math.Pow(5,3));
9) Intellisense shows the signature for Round( ) as: static double Round(double, int) Assuming you had variables answer and value1 of double type, which had 0 and 25.8712 stored in their cells respectively (answer holds 0, value1 holds 25.8712), _______________ would invoke the Round( ) method and store the contents of value1 in answer rounded to one decimal position.
10) _______________ would be a heading for a method that could be used to Display a line of hypens (-)on the screen. This method might be invoked multiple times so that the hypens could be used as separators as part of your final output. Be sure to include the keyword static as part of your answer so that Blackboard is able to assess it properly. The method should be named DisplayResults.
11) _______________ would be a heading for a method that could be used to Accept as an argument a company name, and display that value along with an appropriate label. Be sure to include the keyword static as part of your answer so that Blackboard is able to assess it properly. The method should be named DisplayCompanyName. If you need an identifier for the company name, it should be called cName.
12) _______________ would be a heading for a method that could be used to Accept two integer values as arguments and return the average in the form of a floating point value. Be sure to include the keyword static as part of your answer so that Blackboard is able to assess it properly. The method should be named CalculateAverage. If you need identifiers, use value1, value2 and result.
13) _______________ would be a heading for a method that could be used to Accept three integer values as arguments and displays their contents along with appropriate labels. Be sure to include the keyword static as part of your answer so that Blackboard is able to assess it properly. The method should be named DisplayResults. If you need identifiers, use value1, value2 and value3.
14) Intellisense shows the signature for your method: static void DoSomething() _______________ would call or invoke your method.
15) Intellisense shows the signature for your method: static double DoSomething(int, double) Assuming you had variables answer and value1 of double type, which had 0 and 25.8712 stored in their cells respectively (answer holds 0, value1 holds 25.8712). If you wanted to send 100 as the first argument to the method and the current contents of value1 as the second argument and have the method return some calculated value back to the memory location answer in Main( ) _______________ would invoke or call your method.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started