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
- Pearson 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_forwardAITAM Public Library is the biggest library in Koforidua. Currently, it has about 300 members. A person who is 18 or above can become a member. There is a membership fee of GHC400 for a year. There is a form to be filled in which person fills personal details. These forms are kept in store for maintaining members’ records and knowing the membership period. A member can issue a maximum of three books. He/she has three cards to issue books. Against each card a member can issue one book from library. Whenever a member wishes to issue a book and there are spare cards, then the book is issued. Otherwise that request is not entertained. Each book is to be returned on the specified due date. If a member fails to return a book on the specified date, a fine of GHC 2 per day after the due return date is charged. In case a card gets lost, then a duplicate card is issued. Accounts are maintained for the membership fees and money collected from the fines. There are two librarians for books return…arrow_forwardCase 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_forward
- Jake’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_forwardTasks: 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_forward
- Case Study: A Video Store (AVS) runs a business of renting out video to customers. Every customer must have a AVS customer card in order to rent a video, or he need to apply for one. Customers rent videos for three days at a time. Every time a customer rents a video, the system must ensure that they do not have any overdue videos. If so, the overdue videos must be returned and an overdue fee paid before customer can rent more videos. Likewise, if the customer has returned overdue videos, but has not paid the overdue fee, the fee must be paid before new videos can be rented. Every morning, the store manager prints a report that lists overdue videos. If a video is two or more days overdue, the manager calls the customer to remind them to return the video. If a video is returned in damaged condition, the manager removes it from the video database and may sometimes charge the customer. Task 1: Behavioral communication diagram. Create a communication diagram…arrow_forwardYou have to choose more than one optarrow_forwardPlease i need only code please do only codearrow_forward
- Select 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_forwardhelparrow_forwardSQL queries can accept arguments. In an SQL statement, a parameter variable begins with the __ symbol. Question 12 options: # $ @ &arrow_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