Create a windows form application in C# that looks and functions like a basic calculator. It...

90.2K

Verified Solution

Question

Programming

Create a windows form application in C# that looks and functionslike a basic calculator. It must do the following:
  1. Add, subtract, multiply, and divide.
  2. Account for division by zero.
  3. Show at least two decimal places.
  4. Retain the last number on the window so that, when the useropens the calculator the next time, the number that was in thewindow at the last close appears.
  5. Have a memory, so that users can store values and recallthem.
  6. Operate with a mouse clicking buttons
  7. Operate from the keyboard only with no mouse requirement.
  8. Contain a small box for a company logo. Make up a logo andinsert it there.
  9. Contain a clear and clear all button.
  10. The user must not be able to enter data directly in the displaywindow – they have to press the keys.
  11. Look like a calculator, and not a maximized window.
  12. Use naming conventions for all the elements on the form. Inother words, do not use the default names for the labels, buttons,or other controls.

Answer & Explanation Solved by verified expert
4.0 Ratings (837 Votes)
using System using SystemCollectionsGeneric using SystemComponent Model using SystemData using SystemDrawing using SystemText using SystemWindowsForms namespace Calculator public partial class Form1 Form double FirstNumber string Operation public Form1 InitializeComponent private void n1Clickobject sender EventArgs e if textBox1Text 0 textBox1Text null textBox1Text 1 else textBox1Text textBox1Text 1 private void n2Clickobject sender EventArgs e if textBox1Text 0 textBox1Text null textBox1Text 2 else textBox1Text textBox1Text 2    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students