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

 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

Step by Step Solution

3.52 Rating (162 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Using 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 ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Engineering Questions!