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
C++ Programming: From Problem Analysis to Program Design
- Video-Rental LTD is a small video rental store. The store lends videos to customers for a fee, and purchases its videos from a local supplier. A customer wishing to borrow a video provides the empty box of the video they desire, their membership card, and payment – payment is always with the credit card used to open the customer account. The customer then returns the video to the store after watching it. If a loaned video is overdue by a day the customer's credit card is charged, and a reminder letter is sent to them. Each day after that a further card is made, and each week a reminder letter is sent. This continues until either the customer returns the video, or the charges are equal to the cost of replacing the video. New customers fill out a form with their personal details and credit card details, and the counter staff give the new customer a membership card. Each new customer's form is added to the customer file. The local video supplier sends a list of available titles to…arrow_forwardA patient pack of a drug contains 84 tablets and is designed to last for 1 month. If the patient takes one dose twice a day, what is the dose?arrow_forwardPearson Institute of Higher Education EnrolmentAt the Pearson Institute of Higher Education, the degrees offered have a number of years in which a student is expected to complete the degree. On average, the number of years for a degree is 4. If thestudent takes more than 6 years to complete the degree, they are at risk to be expelled from the institution or asked to repeat the degree altogether. Pearson management has contacted you to write a program to be used to check which students are behind their expected time of degree completion. You have been provided with a text file containing a list of all the students enrolled at the institution with the number of years they have been enrolled. It is structured as follows: Sample Data – PIHEstudents.txtSheunesu Makura, 6Thando Mandela, 4Palesa Ramodike, 3Mariaane Van Der Walt, 5Xolisa Gqeberha, 4 Create a Java application based on the scenario you have been provided above. The application must read the names and the years from the…arrow_forward
- Case Study 5 - Homework Question:After the user, has selected items to purchase and then order the items. The user will provide payment and shipping information. The system will respond with confirmation of the order and a tracking number that the user can use to check on order status in the future. The system will also provide the user with an estimated delivery date for the order, which will include all selected items. The user may already have an account with the company with billing and shipping information. Question: Describe the use case into a formal use case format as follows. Use Case Name: Place Order Actors - ….. Triggers: - …… Preconditions - ……… Post-conditions: - ……… Basic Flow of Events 1. ……… Alternative Flows …….arrow_forwardJake’s Car Rental charges each customer a daily rental fee of $55. However, there is an additional charge for renting a luxury car. The additional charge is $10 if the customer has a Jake’s Luxury coupon; otherwise, the additional charge is $30. What are the primary and secondary decisions?arrow_forwardCase study: Students and staff purchase ready to eat snack-foods such as chocolate bars, cookies, chips, drinks, etc. using an automated vending machine. Each snack-item has a price and a name. Any customer can buy an item, using funds available on the university identity card to pay for it. Cash payments are not allowed. The vending machine has a card reader. Customers tap their ID card against the card-reader. The card-reader reads the card and stores its details for the duration of the interaction. After the card is verified, the customer may choose the snack item and opt to buy it. The vending machine will verify that there is sufficient balance on the card to pay for the item and automatically deducts the amount towards the purchase of the snack-item if sufficient funds are available. The customer can buy as many items as they’d like. Task: Draw a sequence diagram depicting a successful sale scenario for the case study described above.arrow_forward
- Tasks: Design the Pseudo Code. Draw the Flow Chart. An ATM allows a customer to withdraw a maximum of $500 per day. If a customer withdraws more than $300, the service charge is 4% of the amount over $300. If the customer does not have sufficient money in the account, the ATM informs the customer about the insufficient fund and gives the option to withdraw the money for a service charge of $25.00. If there is no money in the account or if the account balance is negative, the ATM does not allow the customer to withdraw any money. If the amount to be withdrawn is greater than $500, the ATM informs the customer about the maximum amount that can be withdrawn. Design pseudo code and flowchart that allows the customer to enter the amount to be withdrawn. It then checks the total amount in the account, dispenses the money to the customer, and debits the account by the amount withdrawn and the service charges, if any.arrow_forwardFordley Car Park is open between 7am and 9pm every day. They charge £2.30 per hour with a minimum fee of one hour and a £2 overnight charge for stays between 9pm and 7.30am. Payments are made at the end of a visit. The car park is also used by resident and business permit holders on the basis of annually renewable membership. All new memberships are registered via the Fordley Car Park website or by completing a form which can be picked up from the car park attendant. Recently Fordley has invested in a paperless attended smart parking system that scans car registration numbers as cars drive through the entrance gate. To ensure that a reading has been captured, the gates only open when a valid registration is read. Exit gates also have a camera which scans the car registration number and will open automatically unless payments are outstanding in which case the payment can be made at the attendant kiosk without leaving the car. Members whose membership has expired can also pay for the…arrow_forwardFordley Car Park is open between 7am and 9pm every day. They charge £2.30 per hour with a minimum fee of one hour and a £2 overnight charge for stays between 9pm and 7.30am. Payments are made at the end of a visit. The car park is also used by resident and business permit holders on the basis of annually renewable membership. All new memberships are registered via the Fordley Car Park website or by completing a form which can be picked up from the car park attendant. Recently Fordley has invested in a paperless attended smart parking system that scans car registration numbers as cars drive through the entrance gate. To ensure that a reading has been captured, the gates only open when a valid registration is read. Exit gates also have a camera which scans the car registration number and will open automatically unless payments are outstanding in which case the payment can be made at the attendant kiosk without leaving the car. Members whose membership has expired can also pay for the…arrow_forward
- Please i need only code please do only codearrow_forwardCourse: Software Engineering A web based software for an online book store is to be developed when a valid customer logon to the site a list of available books is displayed. When the customer selects the required book a form will be displayed that will take input the credit card number and other necessary information of the user. After submission of the form by the customer the validity of the credit card is ensured by a banking system (external to the system). The valid orders are passed to the shipment department and an email is sent to the customer that his order is being shipped. Mention your brain storming as well before the drawing. Write four functional (user+system) requirements. Draw level 1 DFD of the given scenario. Draw ERD of the given scenario.arrow_forwardSelect the if statement that assigns .2 to commissionRate if the monthlySales is greater than 10000. if monthlySales > 10000: .2 = commissionRate if monthlySales > 10000: commissionRate if monthlySales > 10000 commissionRate .2 if monthlySales > 10000: commissionRate == .2arrow_forward
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks ColeA Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
- COMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE LNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageEnhanced Discovering Computers 2017 (Shelly Cashm...Computer ScienceISBN:9781305657458Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. CampbellPublisher:Cengage Learning