008-003-004
Method Call: Calculator Class
Easy
Problem Description
method Call: Calculator class
Learning Objective
Learn how to call one method from another method.
Problem
In this problem, you will create a program that receives two integers, calls the add and multiply methods from the calculate method, and displays the sum and product results to standard output.
Create a program that inputs two numbers and displays both sum and product results.
Call add and multiply methods from the calculate method.
Input
Line 1: First number (integer)
Line 2: Second number (integer)
Output
Sum: [sum]
Product: [product].
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up