Write a method with the following specifications: name : CalculateSumOfSquares arguments        : int representing the number of input that will constitute the sum return value     : int representing the sum of the squares of its input displays             : the user prompts but NOT the sum of the squares tasks: prompt the user for inputs and accumulates the sum of the squares of the input. This is repeated as specified by the argument. Returns the final sum In your main when the user enters 4 in response to the menu choices, you will prompt the user for the number of inputs that she will be working with. You will invoke this method with this value and display the resulting value. Write a method with the following specifications: name : CalculateSumOfCubes arguments        : none return value     : int representing the sum of the cubes of its input displays             : the user prompts but NOT the sum of the cubes tasks: prompt the user for the number of inputs that she will be working with read in the user input Prompts the user for their input Accumulates the sum of the cubes input Repeat the above two steps are many times as required Returns the final sum In your main when the user enters 5 in response to the menu choices, you will invoke this method and display the resulting value.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 9E
icon
Related questions
Question
  1. Write a method with the following specifications:
    name : CalculateSumOfSquares
    arguments        : int representing the number of input that will constitute the sum
    return value     : int representing the sum of the squares of its input
    displays             : the user prompts but NOT the sum of the squares
    tasks
    : prompt the user for inputs and accumulates the sum of the squares of the input. This is repeated as specified by the argument. Returns the final sum

    In your main when the user enters 4 in response to the menu choices, you will prompt the user for the number of inputs that she will be working with. You will invoke this method with this value and display the resulting value.
  2. Write a method with the following specifications:
    name : CalculateSumOfCubes
    arguments        : none
    return value     : int representing the sum of the cubes of its input
    displays             : the user prompts but NOT the sum of the cubes
    tasks
    :
  • prompt the user for the number of inputs that she will be working with
  • read in the user input
  • Prompts the user for their input
  • Accumulates the sum of the cubes input
  • Repeat the above two steps are many times as required
  • Returns the final sum

In your main when the user enters 5 in response to the menu choices, you will invoke this method and display the resulting value.

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Returning value from Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT