代写 android C# CSE 470J/570J

CSE 470J/570J
Project #3 – Scientific Calculator
Fall 2019

You will create a calculator app loosely based on the following online calculator shown to the right.

The following features of the online calculator are to be ignored in your implementation:
• Toggling between scientific and standard calculator.
• The “tape” and “hide tape” feature.
• Memory does not need to be displayed.
• Shadowed, buttons.

The following features are required in your implementation, but are not implemented in the online calculator:
• xy should insert a ^ into the expression. Note, this is different behavior that the online calculator.

CSE 470J. Your calculator must look [approximately] like the online calculator. Color and arrangement of buttons should match. Your calculator must function like the online calculator except for the operations shown in the list below. Any buttons that do not have implemented functionality must be present, but disabled. Features you can omit:
• €, $, %, and rate are to be disabled.
• ( and ) are to be disabled.
• The window must display expressions of any number of operations (e.g., 10+2*4-100) but the evaluation (i.e., pressing =) has to work only for expressions involving at most one operation (e.g., 10*2). Display the number -1 if the expression has more than 1 operation.

CSE 570J. Similar to the 470J requirements but with these changes to features::
• €, $, %, and rate are to be disabled.
• ( and ) are to be disabled.
• Evaluate all expressions.
• Buttons should be disabled if they will cause an error situation. For example, the online calculator will allow the “=” to be clicked when the display window contains “8*”. Your implementation should disable the “=” button in that situation.
Notes.
• You are to assume that the device will be phone-sized and held in portrait mode.
• Provide a Canvas note when submitted to indicate which of the following three options you want your program to be run:
• iOS: iPhone
• Android: Pixel
• UWP: using a window resized to be roughly the shape/size of a phone held in portrait mode
• Your app must be a functional version of a calculator and must have an appearance that mirrors the sample listed.
• Here is a summary of the buttons and their typical functionality:
• 0-9 – Append a digit
• ÷, ×, +, -, xy – Append an operation
• Decimal places – alter the number of fractional digits.
• Exp – operation that multiple the first number by 10x
• ± – Toggles sign of number in window
• M+, M-, MR, MS, MC – Alter the item held in memory by evaluating the expression in the window.
• DEL – Remove last char in window
• sin, cos, tan, 1/x, x!, asin, acos, atan, 10x, ln, log, √, x2 – Evaluate the expression and apply the operation.
• 𝜋 – Put (or append) the value of pi into the window.
• When evaluating expressions, you are not allowed to use the C# Expression class (or similar); you are to manually process the expressions from basic principles.
• Follow the submission instructions when ready to submit to Canvas.

Scoring.
• (65/60) Operation. You application must operate correctly.
• (55/35) Basic operation.
• (10/5) Appearance.
• (0/10) Operator precedence.
• (0/10) Enabling/disabling buttons.
• (15/10) XAML. Your application must use XAML to
• (20/30) Minimal redundant code. Of course, you are always expected to utilize good programming style. For this assignment, focus will be placed on minimizing redundant code. This includes carefully reusing event handlers and/or writing helper methods to reduce the amount of code written.