Accomplish the following for the given class diagram. Arithmetic - num1: int num2: int 1. Create the class implementation using C++ 2. Using the constructor, create two objects Arithmetic (nl: int, n2 : int) get Num1 (): int + get Num2 (C: int • add (n1 : int, n2 : int): int + subtract (nl : int, n2 : int): int multiply (n1 : int, n2: int): int + divide (n1 : int, n1 : int): int + modulo (n1 : int, n2 : int): int from class Arithmetic and store it in the heap memory. 3. Test all the functions of the two objects

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 16RQ
icon
Related questions
Question
Accomplish the following for the given class diagram.
Arithmetic
- num1: int
num2: int
1. Create the class implementation using C++
2. Using the constructor, create two objects
Arithmetic (nl: int, n2 : int)
get Num1 (): int
+ get Num2 (C: int
• add (n1 : int, n2 : int): int
+ subtract (nl : int, n2 : int): int
multiply (n1 : int, n2: int): int
+ divide (n1 : int, n1 : int): int
+ modulo (n1 : int, n2 : int): int
from class Arithmetic and store it in the
heap memory.
3. Test all the functions of the two objects
Transcribed Image Text:Accomplish the following for the given class diagram. Arithmetic - num1: int num2: int 1. Create the class implementation using C++ 2. Using the constructor, create two objects Arithmetic (nl: int, n2 : int) get Num1 (): int + get Num2 (C: int • add (n1 : int, n2 : int): int + subtract (nl : int, n2 : int): int multiply (n1 : int, n2: int): int + divide (n1 : int, n1 : int): int + modulo (n1 : int, n2 : int): int from class Arithmetic and store it in the heap memory. 3. Test all the functions of the two objects
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT