Formal Methods: Boolean Specification A store has a rewards program: customers receive a discount based on the
Question:
Formal Methods: Boolean Specification A store has a rewards program: customers receive a discount based on the number of reward points they have acquired and whether they have the status of being a gold customer. Write a Boolean specification (including relational expressions as appropriate) for the program to determine whether a reward is deserved based on the following business rules:
A customer pays full price if the number of reward points is less than 100 and the customer is not a gold customer.
A customer pays full price if the number of reward points is less than 50 and the customer is a gold customer.
A customer receives a discount if the number of reward points is greater than or equal to 100.
A customer receives a discount if the number of reward points is greater than or equal to 50 and the customer is a gold customer.
If the number of reward points is less than 1, print an error message. Write the Boolean specification for the full price, the discount price, and the error condition. Please use the following identifier names for consistency: D = discount received F = full price paid E = error (less than 1 reward point entered) r = number of reward points g = gold customer Grading Rubric Correct specification for full price, 40 points Correct specification for discount, 40 points Correct specification for error, 20 points
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell