Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Could someone please help me complete this program? I've posted all required information below. Thank you very much for your time! P.S. I also would

Could someone please help me complete this program? I've posted all required information below. Thank you very much for your time!

P.S. I also would need the Pseudocode for the program. This program needs to be written in Java code. Thank you!

Multiplication and Division

Design a program that will ask the user to input two numbers on the condition that the second number can not be zero. The program then performs the basic arithmetic operations: multiplication and division. Each calculation is done by a separate function. The main function gets the user's input, then calls the multiplication function and the division function one at a time to perform the calculations. Each calculation function (multiplication or division function) performs an arithmetic operation and then returns the calculation results to where it was called. The main function then calls the display function (one at a time) to display the results for the user on the screen. Note, the display function is already developed for you and you must use it in your program without modifying the display function. For each set of numbers the user entered, the program produces the product and the values' quotient. You may assume the quotient is calculated by the first number divides by the second number.

Draw an IPO chart for each function, write a Pseudocode program. Besides, apply all the techniques you've learned, be sure to document your programs, and apply good programming styles.

Please note:

  • For this homework, you do not need to check if the second number is 0. But make sure you clearly prompt the users not to enter a 0 as the second number.
  • You do not need to format the output. The result should be raw numbers returned by the functions, which may contain many digits after the decimal.

Required functions:

Your program must contain four functions:

Function void main() //void main(String args[]) Function Real multiplication(Real x, Real y) //int multiplication(int x, int y) Function Real division(Real a, Real b) //int division(int a, int b) Function void display(Real data) //void display(int data)

The display function (Pseudocode - Do NOT modify

Function void display(Real result) Display result End Function

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions