Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

IFT (7) QUESTIONS (2)

Q1: Loops  

Scenario: The Rodeo Botique store is having a sale and will discount its merchandise at 20% each day for the next three days, Monday through Wednesday .That is: on Monday, the item has been discounted 20% from its starting price on Sunday. Tuesdays price is discounted 20% from Monday’s price and so on. Use Python notation..Note: I am not asking you to run Python, just use variables and appropriate while loop to show what it would look like in Python..

Draw  a flow chart that includes an intialization module that sets up initial price and a counter to count the days, a while loop that tests for  the three days, a processing module that discounts the price and increments the counter and a print module that prints out the counter and the price for each day.

Show how this works starting with a $100 dollar item. Show how that prices changes during the three iterations. What is the final price on Wednesday?

Q2: Recursion 

Scenario:

The factorial function multiplies all the numbers from 1 to a specified number, ‘n’, so

for example,  fact(3) = 3* 2 * 1, where ‘3’ plays the role of ‘n’

If I define a factorial function as follows,

def fact( n ) :

      if ( n <= 1 ) :              

      else:  n * fact(n – 1)

Trace out the sequence of function calls when n =4

annotate the lines as I have done, with true or false..

I will start you out, assuming you invoke the function by typing ‘fact(4)’ as below and hitting ‘run’.

   fact (4)

    if (4<= 1) : 1   # this is false so go to the else branch

else: 4 * fact(3)

if ( 3 <= 1) : 1 # this is false so go to the else branch

                    else:  3 * fact( 2)

                                      ??? fill in the next steps to complete the process  and return a final number      

Q3:  Scenario: Client Decisions  

The Rodeo Botique serves some wealthy clients as well as bargain hunters. The Rodeo clerks have  decision table  with three criteria and four actions in order to decide how to handle a potential purchase.

Condition A : Client want to purchase more than $1000 worth of merchandise

Condition B : Client already owes the store more than $8000

Condition C:  Client is more than 60 years old ( these are more reliable clients!)

Set up a complete decision table, in order, following the format in your text and where the four actions are effected as follows: ( use can  use the letters A, B, C to stand for the conditions and you can put the a1, a2, a3, a4 at the base of each condition column)

For TTF and  TFT invoke a1

For  FFT use  a2, and for FTF use  a3, all others are  a4

Q7: Domain Driven Design

CLO 2: Modeling in the environment

Write a paragraph describing the customer information domain for the Rodeo Botique, discussed in questions  Q1 and Q3. That is, in your paragraph, list at least 5  variables that  the Botique management would  recognize as relevant to their business, as you set up  their discount programs and their client decision table.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question