Calc Logic Assessment
Calc Logic Assessment
Objective:
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).
Use the code attached in this assessment, which is (My Calculator with Logic Seed.zip).
Required Tasks:
1. 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).
2. 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.
3. 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:
a. M+ adds the displayed number to memory
d. MR recalls the memory (bring the memory variable value back to display)
4. 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).
5. 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
Rubric
Solution A difficult, non- A logical solution that Solution is efficient Solution is efficient,
implementation easily- is easy to follow but it and easy to follow easy to understand, and
efficiency comprehendible, or is not the most Prompts/hints/messa maintain
10% inefficient solution, or efficient ges to user are Excellent prompts/
Prompts/hints/messag Prompts/hints/message understandable, hints/ messages to user.
es to user are s to user contain little minimum use of
misleading or non- information, poor symbols or spacing
existent. design. in output.
Design, Coding Poor use of spacing, Implementation of the Good use of spacing Excellent use of
Standards, conventions and factors below was just Standards and indentation and
Clarity and standards fine but can be conventions were following of standards
Documentation Disorganized code/UI enhanced well followed Creatively designed and
10% Poor use of variables Good spacing. Most Well organized work. organized work.
(global variables, coding standards were Good use of Excellent use of
hardcoded values, followed variables variables (no global
ambiguous naming) Good code/UI. Clearly documented. variables, unambiguous
No comments on main Basic documentation Purpose for each naming).
sections/subsections, Purpose is noted for function and control Clearly documented
or each method/block of structure is clearly code, specific purpose
No documentation code communicated. is noted for each section
included
Delivery Not delivered in Delivered on time, and Completed between ALL requirements were
10% correct format (not in correct format 70-90% of the met
submitted online, not (Word/ PDF/Zip etc) requirements. Submitted on time, and
in correct MS Submission clearly Delivered on time, in in proper formats and
Word/PowerPoint/PD included name(s), correct format structures
F/ZIP format...), or ID(s), date, title and all (Word/PDF/ZIP etc) Submission clearly
Student expected data Submission clearly included name(s), ID(s),
Name(s)/ID(s) not included name(s), date, title and all
included, or no ID(s), date, title and expected data
date/title is included all expected data