The goals of this assessment activity is to get experience in enhancing the design and coding of a project, and to start using the design patterns for your app architecture.
Read the requirements thoroughly, answer the questions, and submit your answer on Blackboard by the due date.
DO NOT COPY/PASTE ANY CODE FROM ANYWHERE. All the codes should be ORIGINAL (written by you).
- Split the User Interface related java code (CalcActivity.java) from the calculator logic (the Calculator model/engine) and add to the calculator logic all the required functions and properties (that does not access the UI objects directly).
- The Calculator class should include the logic of ALL the calculator functions, including the memory logic as well as processing of both integers and real numbers.
- Make sure to add Memory buttons to the calculator project (MC, M+, M-, MR) and a memory variable/property in the app logic. The functions of these 4 buttons are to clear, add to, subtract from, and recall the memory. The function of each button is as follows:
- M+ adds the displayed number to memory
- M- subtracts the displayed number from memory
- MC clears the memory (i.e. resets the memory variable to Zero)
- MR recalls the memory (bring the memory variable value back to display)
- Your calculator will have a percentage (%) button and clear (C) buttons. Make sure your % button works like Google’s calculator percentage button found in https://www.google.com/search?q=google+calculator for all of the basic operations (x+y% , x-y%, x*y%, x/y%, x%). And that your C button will clear the current displayed number when clicked once, then it will clear all of the previous calculations (reset the calculator) when it is clicked again (right after the first time).
- Try the calculator using various test cases, take screenshots of each test case.Submission details:
- Copy your codes (activity class, calculator class and XML codes) to a new word document named StudentID_Calc_Logic.docx, and add to this document at least 5 snapshots of your running calculator app showing the use of % and memory buttons among other use cases.
- Export your project to zip (File -> Export -> Export to zip file) and name the zip file as above (.zip)
- Submit your code zip file and the document by the due date
本网站支持 Alipay WeChatPay PayPal等支付方式
E-mail: firstname.lastname@example.org 微信号:vipnxx