Concept explainers
Explanation of Solution
Get balance, the amount in the account of the user.
Prompt the user to enter the amount to be withdrawn amount.
Determine if the amount withdrawal is allowed using the following formula and store the result in allowed:
If (amount is more than 500 or balance is zero or balance is negative)
Print “You are not allowed to withdraw more than $500 per day“
allowed = false
otherwise
allowed = true
deduction = 0 (suppose deduction is the amount by which the account balance will be finally deducted)
Calculate serviceCharge and deduction using the following formula:
If (allowed is equal to true)
If (balance < amount)
Print "Insufficient balance, withdrawal with service charge of $25.00"
Get choice to withdraw
if (choice is Yes)
serviceCharge = 25...
Trending nowThis is a popular solution!
Chapter 1 Solutions
MINDTAP COMPUTING FOR MALIK'S C++ PROGR
- please Answer this Question Even use hand write but please don't Reject. Draw the Decision table for the following scenario: Suppose a customer would like to withdraw money from an ATM machine. If they insert invalid card, the machine will reject the card. If the card is valid, they are prompt to enter a PIN number. If the PIN is wrongly keyed, the machine will prompt user to re-enter the PIN. If the next attempt is fail then the machine will eat the card. If the PIN is successfully entered, the machine will allow user to dispense the requested cash if the balance is sufficient.arrow_forwardA retail store has a preferred customer plan where customers can earn discounts on all their purchases. The amount of a customer’s discount is determined by the amount of the customer’s cumulative purchases in the store as follows: • When a preferred customer spends $500, he or she gets a 5 percent discount on all future purchases. • When a preferred customer spends $1,000, he or she gets a 6 percent discount on all future purchases. • When a preferred customer spends $1,500, he or she gets a 7 percent discount on all future purchases. • When a preferred customer spends $2,000 or more, he or she gets a 10 percent discount on all future purchases. Design a class named PreferredCustomer, which is derived from the Customer class you created in Programming Problem 4. The PreferredCustomer class should have properties for the amount of the customer’s purchases and the customer’s discount level. Demonstrate the class in a simple application.arrow_forwardFrom an ATM, a user may withdraw up to $500 every day. The service fee is 4% if a consumer withdraws more than $300. It alerts the customer of insufficient cash and offers to withdraw the funds for a $25 charge. If your account has a negative balance or is empty, you won't be able to withdraw money from the ATM. The ATM notifies the user of the maximum withdrawal amount and refuses the transaction if it exceeds $500. Create a withdrawal amount entry algorithm that clients may use. After checking the account balance, the algorithm debits the customer's account for the amount withdrawn plus any applicable service charges.arrow_forward
- The customer who arrives at a bank, sees a long line, and leaves to return another time is __________.balkingcroppingrenegingblitheringnone of the abovearrow_forwardAl Watan supermarket has hire-purchases scheme for locals and expats. The customers will get the credit facility if they satisfy any of the following conditions: The customer must hold the present job for more than 5 years and reside in the same place at least for 3 years. In this case, the customer will get credit upto rupees 300 omr. The monthly salary of the customer must exceed 1000 omr and must hold the present job for more than 5 years. In this case credit will be given upto rupees 500 omr. The monthly salary must exceed 1000 omr and reside at the same place at least for 3 years. In this case credit will be given upto 500 omr. In the case, the customer’s monthly salary exceeds 1000 omr, holds the present job for more than 5 years and also reside in the same place at least for the 3 years, the credit facility will be upto 1000 omr The credit facility is rejected for all other customers. Prepare a Decision Table for this hire- purchase schemearrow_forwardA bank locker system has one lock and three keys.O=1, indicates the Owners key is open.M=0,indicates the Managers key is off.N=1, indicates the Nominees key is openL=0 means the locker is off.The locker(L) can be open only for the following conditions:If the Manager’s key and nominee’s keys are open but the owner key is close. ORIf the Manager’s and owner’s keys are open but the other key is close. ORIf the Owner’s key is open but the other keys are close. ORIf all keys are open.i. Find the Boolean function for the above systems outputs 2ii. Simplify the output functions using Boolean Algebra. 22.arrow_forward
- Test a discount system in some e-shop. The system can send a loyalty card to a client and admit a discount according to the following rules: “No discount” is the default discount option. A non-registered user has 0% discount by definition. If a registered user spent more than $1000 in the previous shopping sessions, and there were 19 or less shopping sessions, admit 5% discount. If a registered user spent more than $1000 in the previous shopping sessions and there were at least 20 shopping sessions, admit 10% discount. A loyalty card is sent only to registered customers who spent more than $1000 or had at least 20 shopping sessions.Construct a decision table for the above business logic.arrow_forwardBarnhill Fastener Company runs a small factory. The company employs workers whoare paid one of three hourly rates depending on skill level:Each factory worker might work any number of hours per week; any hours over 40are paid at one and one-half times the usual rate.In addition, workers in skill levels 2 and 3 can elect the following insurance options: Skill Level Hourly Pay Rate ($)1 17.002 20.003 22.00 Option Explanation Weekly Cost to Employee ($)1 Medical insurance 32.502 Dental insurance 20.003 Long-term disability insurance 10.00 Exercises 295Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent…arrow_forwardSaira owns a small business and she frequently makes transactions. Sometimes she makes payments and other times payments are credited in her account. One of her customer Tania purchased a product and credited payment while another payment by Saira was in progress. Now the sequence of transaction is as follows:1. Tania’s account read amount in saira’s account2. Saira’s account read amount in saira’s account3. Tania added Rs. 500/- in original amount (that was lets suppose Rs. 60,000/ 4. Saira’s account subtracted Rs. 2000/- that she debited in someone else’s account form the original amount (that was Rs. 60,000) 5. Tania’s account committed the transaction 6. Saira’s account committed the transaction Draw the above-mentioned sequence in form of a table and see if there is a problem. What this problem is called and how can we avoid such kind of problem? Propose some solutions (at least two) and then explain which one is better and why?arrow_forward
- Design a system for a restaurant in which users can order multiple food items from the following menu:• Press 1 to buy pizza• Press 2 to buy rice• Press 3 to buy steak• Press 4 to buy spaghetti• Press 5 to buy teaThe user enters the balance on their credit card. User can buy multiple products if he/she has the desired balance. If the user is a member of the restaurant, then the system should give a 10% discount. In the end, add 16% GST on total bills and deduct money from a credit card. You are required to follow the following price chart of the products:• Pizza= 1500• Rice= 350• Steak = 1100• Spaghetti=500• Tea=30arrow_forwardA school has 100 lockers and 100 students. All lockers are closed on the first day of school. As the students enter, the first student, denoted as S1, opens every locker. Then the second student, S2, begins with the second locker, denoted as L2, and closes every other locker. Student S3 begins with the third locker and changes every third locker (closes it if it was open and opens it if it was closed). Student S4 begins with locker L4 and changes every fourth locker. Student S5 starts with L5 and changes every fifth locker, and so on, until student S100 changes L100. After all the students have passed through the building and changed the lockers, which lockers are open? Write a program to find your answer and display all open locker numbers separated by exactly one space. (Hint: Use an array of 100 Boolean elements, each of which indicates whether a locker is open (true) or closed (false). Initially, all lockers are closed.)arrow_forwardBLACKJACK DO not use jquery strictly java script Black Jack is a simple card game that is also often called 21. The point of the game is to get a value as close to 21 without going over. A player that obtains the score of 21 with only 2 cards is said to have a Black Jack. Rules of the game: There are 2 types of participants in a game of Black Jack, the dealer and the players. The players play against the dealer and not against each other. In order to win, the player must have a hand value superior to that of the dealer’s. The game starts with each player receiving 2 cards, the dealer receiving 2 cards. Each player has the option to add an additional cards (1 by 1) to his hand (Draw) or to stay with the cards he currently has (Hold). If at any point, the player’s total exceeds 21, he automatically loses the hand (Bust). When all players complete this process, the dealer gets to complete his hand. As long as the dealer’s point total is 16 or less, he must draw a new card. As soon as…arrow_forward
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks ColeNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage