Skip to content

Branches - Amal #41

Open
ashassan wants to merge 1 commit intoAda-C12:masterfrom
ashassan:master
Open

Branches - Amal #41
ashassan wants to merge 1 commit intoAda-C12:masterfrom
ashassan:master

Conversation

@ashassan
Copy link

@ashassan ashassan commented Aug 7, 2019

Calculator

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
What went well in your code style, such as indentation, spacing, variable names, readability, etc.? What was lacking? I think mine is easy to follow because everything is in chunks. I wish I got to do the enhancements for the project. I also wish I figured out a way to simplify the if statement to do the operations (maybe with each).
How did your code keep track of user input? I kept track of user input with variables.
How did your code determine what operation to perform? I determined what operation to perform with an if statement. Once I matched my variable with the correct operation, I did the corresponding calculation
What opportunities exist to create small methods for this project? You can create small methods for input validation.
In the next project, what would you change about your process? What would you keep doing? I want to start adding psuedo code to my file to be more organized. I am going to keep discussing with my classmates to brainstorm. I am also going to continue finishing the assignment first and then start thinking about the enhancements.

@jmaddox19
Copy link

Calculator

What We're Looking For

Feature Feedback
Readable code with consistent indentation X
Practices using variables appropriately X
Practices using conditionals appropriately X
If any, practices iteration appropriately X
If any, practices using custom methods appropriately X
Takes in two numbers and an operator and can perform addition X
Takes in two numbers and an operator and can perform subtraction X
The program handles divide when attempting to divide by zero No

Your work looks great!
You used variable, loops, conditionals all in appropriate ways and it looks great!

There were a couple cases I tested that don't work with your validation logic.
(1) Dividing by a negative number results in a ruby error that breaks the program rather than asking to enter a different number. This is tricky because it isn't validation you want to do for all operations, only when divide was chosen.
(2) The regex you have doesn't allow for negative numbers.

Again, it looks great! As we move forward we'll talk more about "edge case" testing, which will help us catch issues like these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants