Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5 . 2 8 Project 1 - Function Calculator This lab will be available until March 3 rd , 1 1 : 5 9 PM

5.28 Project 1- Function Calculator
This lab will be available until March 3rd,11:59 PM EST
For Project 1, you will design and implement a program that has a selection menu of mathematical operations. The user should select an option from the printed menu to perform that specific operation. The program will echo the selected function back to the user and then ask for a desired input argument for the selected function. The program will then perform the operation and return the result. The functions required for this program include: [1] sin(x),[2] cos(x),[3] tan(x),[4] sqrt(x),[5] ln(x), and [6] factorial(x).
Sample Menu:
Welcome to the ET 2100 Function Calculator.
Please enter a selection 1-6.
Enter 'quit' or 'exit' to end the session.
[1] sin(x)
[2] cos(x)
[3] tan(x)
[4] sqrt(x)
[5] ln(x)
[6] factorial(x)
Selection >>>
For trigonometric functions (sine, cosine, tangent), the required input argument should be in degrees (need to switch from default input of radians). For sqrt(x) and ln(x), only use positive values. The final function, factorial(x), should accept integer values.
Process of execution:
Print the function menu and prompt user for a selection.
Take input and echo selection back to user.
Prompt user for input argument value.
Take and store input value for computation.
Perform appropriate operation based on menu selection.
Print the result.
Loop program to ask user for next operation.
Give user choice to "exit" or "quit" the program.
Your code will be evaluated through 10 tests including: menu development, input selection, argument input, function computation, loop structure, and escape sequence.

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

Introduction To Database And Knowledge Base Systems

Authors: S Krishna

1st Edition

9810206208, 978-9810206208

More Books

Students also viewed these Databases questions

Question

Describe the menstrual cycle in a woman.

Answered: 1 week ago

Question

Explain methods of metal extraction with examples.

Answered: 1 week ago