Question
Create a class called MyAwesomeMath and add Addition, Subtraction, Multiplication and Division as methods. Also, when asking user for entering the first and the
Create a class called MyAwesomeMath and add Addition, Subtraction, Multiplication and Division as methods. Also, when asking user for entering the first and the second number; store those numbers in two class variables called firstNumber and secondNumber. Make sure you create an _init___ method in your class and initialize the firstNumber and secondNumber to 0. The following is the output of your program Enter first number: 3 Enter first number: 2 1. ADDITION 2. SUBTRACTION 3. 4. DIVISION Enter your choice: 1 MULTIPLICATION 5 1. ADDITION 2. SUBTRACTION 3. MULTIPLICATION 4. DIVISION Enter your choice: 2 1. ADDITION 2. SUBTRACTION 3. MULTIPLICATION 4. DIVISION Enter your choice:3 6 1. ADDITION 2. SUBTRACTION 3. MULTIPLICATION 4. DIVISION Enter your choice:4 1.5 1. ADDITION 2. SUBTRACTION 3. MULTIPLICATION 4. DIVISION
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 StartedRecommended Textbook for
Java An Introduction To Problem Solving And Programming
Authors: Walter Savitch
8th Edition
0134462033, 978-0134462035
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App