SlideShare a Scribd company logo
1 of 4
Download to read offline
C++ Programming Assignment
ATM Machine Phase 1
In this assignment you will create a program that allows a user to do the
following:
1) Create a bank account by supplying a user id and password.
2) Login using their id and password.
3) Quit the program.
Now if login was successful the user will be able to do the following:
1) Withdraw money.
2) Deposit money.
3) Request balance.
4) Quit the program.
If login was not successful (for example the id or password did not match)
then the user will be taken back to the introduction menu.
This is what your program in action will look like:
Hi! Welcome to Mr. Zamar’s ATM Machine!
Please select an option from the menu below:
l -> Login
c -> Create New Account
q -> Quit
> l
Please enter your user id: 12
Please enter your password 2345
******** LOGIN FAILED! ********
Please select an option from the menu below:
l -> Login
c -> Create New Account
q -> Quit
> c
Please enter your user name: 12
Please enter your password: 2345
Thank You! Your account has been created!
l -> Login
c -> Create New Account
q -> Quit
> l
Please enter your user id: 12
Please enter your password: 2345
Access Granted!
d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
> d
Amount of deposit: $20
d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
> r
Your balance is $20.
d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
> w
Amount of withdrawal: $2.5
d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
> r
Your balance is $17.5.
d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
> q
Thanks for stopping by!
Phase 1 of this project will require you complete the code found on the next page.
// CODE STARTS HERE
#include <iostream.h>
#include <stdlib.h>
// function prototypes
void printIntroMenu();
void printMainMenu();
void start();
void login();
void createAccount();
// global variable (use this variable to store the user’s menu selection)
char menuInput;
// the main function
int main()
{
// TO WRITE A WELCOME MESSAGE HERE
// call the function start
start();
return 0;
}
void printIntroMenu()
{
// WRITE CODE HERE
}
void printMainMenu()
{
// WRITE CODE HERE
}
void start()
{
// EXPLANATION OF CODE THAT GOES HERE IS BELOW
}
void createAccount()
{
// PHASE 2
}
void login()
{
// PHASE 2
}
// CODE ENDS HERE
The function printIntroMenu() displays the following:
Please select an option from the menu below:
l -> Login
c -> Create New Account
q -> Quit
>
The function printMainMenu() displays the following menu:
d -> Deposit Money
w -> Withdraw Money
r -> Request Balance
q -> Quit
>
The function start() does the following:
1) Displays the following message, “Please select an option from the menu below: ”
2) Displays the introduction menu. Do this by calling the function you created
earlier, printIntroMenu()
3) Program halts and waits for the user to make their selection. Use the cin >>
function to accomplish this step.
4) Now use a switch statement to do the following:
If the user types the character ‘l’ then the function login() is called
If the user types the character ‘c’ then the function createAccount() is called.
If the user types ‘q’ your program will terminate by calling the function exit(0)

More Related Content

Viewers also liked

Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++Amresh Raj
 
How to Work with Dev-C++
How to Work with Dev-C++How to Work with Dev-C++
How to Work with Dev-C++Deepak Jha
 
automated teller machines
automated teller  machinesautomated teller  machines
automated teller machinestejinderubs
 
Payroll Management System SRS
Payroll Management System SRSPayroll Management System SRS
Payroll Management System SRSShubham Modi
 

Viewers also liked (8)

Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++
 
How to Work with Dev-C++
How to Work with Dev-C++How to Work with Dev-C++
How to Work with Dev-C++
 
Payroll
PayrollPayroll
Payroll
 
Atm (bm)
Atm (bm)Atm (bm)
Atm (bm)
 
An atm with an eye
An atm with an eyeAn atm with an eye
An atm with an eye
 
automated teller machines
automated teller  machinesautomated teller  machines
automated teller machines
 
Payroll Management System SRS
Payroll Management System SRSPayroll Management System SRS
Payroll Management System SRS
 
Atm System
Atm SystemAtm System
Atm System
 

Similar to Lo39

JAVA PROJECT REPORT.pptx
JAVA PROJECT REPORT.pptxJAVA PROJECT REPORT.pptx
JAVA PROJECT REPORT.pptxAbhiramAleti
 
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...sriram sarwan
 
Cbse computer science (c++) class 12 board project bank managment system
Cbse computer science (c++)  class 12 board project  bank managment systemCbse computer science (c++)  class 12 board project  bank managment system
Cbse computer science (c++) class 12 board project bank managment systempranoy_seenu
 
TechSupportCh 21 project.doc1Projects.doc Project 21-.docx
TechSupportCh 21 project.doc1Projects.doc Project 21-.docxTechSupportCh 21 project.doc1Projects.doc Project 21-.docx
TechSupportCh 21 project.doc1Projects.doc Project 21-.docxmattinsonjanel
 
C++ project
C++ projectC++ project
C++ projectSonu S S
 
OOP PPT Group H.pptx
OOP PPT Group H.pptxOOP PPT Group H.pptx
OOP PPT Group H.pptx20021519016
 
Question Hello, I need some assistance in writing a java pr...Hel.pdf
Question Hello, I need some assistance in writing a java pr...Hel.pdfQuestion Hello, I need some assistance in writing a java pr...Hel.pdf
Question Hello, I need some assistance in writing a java pr...Hel.pdfhainesburchett26321
 
This what Im suppose to do and this is what I have so far.In thi.pdf
This what Im suppose to do and this is what I have so far.In thi.pdfThis what Im suppose to do and this is what I have so far.In thi.pdf
This what Im suppose to do and this is what I have so far.In thi.pdfkavithaarp
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd marchRajeev Sharan
 
BizSmart First Time Setup Guide
BizSmart First Time Setup GuideBizSmart First Time Setup Guide
BizSmart First Time Setup GuideAllianceBankMY
 
Payment Request API with a React high order component
Payment Request API with a React high order componentPayment Request API with a React high order component
Payment Request API with a React high order componentMarco Lanaro
 
BANK MANAGEMNT SYSTEM.pptx
BANK MANAGEMNT SYSTEM.pptxBANK MANAGEMNT SYSTEM.pptx
BANK MANAGEMNT SYSTEM.pptxVjVj28
 
Inventory management system
Inventory  management  systemInventory  management  system
Inventory management systemRavi Vghl
 
I need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdfI need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdfrajeshjangid1865
 
CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   llflowe
 

Similar to Lo39 (20)

JAVA PROJECT REPORT.pptx
JAVA PROJECT REPORT.pptxJAVA PROJECT REPORT.pptx
JAVA PROJECT REPORT.pptx
 
Atm Simulator
Atm SimulatorAtm Simulator
Atm Simulator
 
Atm Simulator
Atm SimulatorAtm Simulator
Atm Simulator
 
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
 
Cbse computer science (c++) class 12 board project bank managment system
Cbse computer science (c++)  class 12 board project  bank managment systemCbse computer science (c++)  class 12 board project  bank managment system
Cbse computer science (c++) class 12 board project bank managment system
 
TechSupportCh 21 project.doc1Projects.doc Project 21-.docx
TechSupportCh 21 project.doc1Projects.doc Project 21-.docxTechSupportCh 21 project.doc1Projects.doc Project 21-.docx
TechSupportCh 21 project.doc1Projects.doc Project 21-.docx
 
C++ project
C++ projectC++ project
C++ project
 
OOP PPT Group H.pptx
OOP PPT Group H.pptxOOP PPT Group H.pptx
OOP PPT Group H.pptx
 
Question Hello, I need some assistance in writing a java pr...Hel.pdf
Question Hello, I need some assistance in writing a java pr...Hel.pdfQuestion Hello, I need some assistance in writing a java pr...Hel.pdf
Question Hello, I need some assistance in writing a java pr...Hel.pdf
 
This what Im suppose to do and this is what I have so far.In thi.pdf
This what Im suppose to do and this is what I have so far.In thi.pdfThis what Im suppose to do and this is what I have so far.In thi.pdf
This what Im suppose to do and this is what I have so far.In thi.pdf
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd march
 
Cpe%20ppt (1).pptx
Cpe%20ppt (1).pptxCpe%20ppt (1).pptx
Cpe%20ppt (1).pptx
 
BizSmart First Time Setup Guide
BizSmart First Time Setup GuideBizSmart First Time Setup Guide
BizSmart First Time Setup Guide
 
Payment Request API with a React high order component
Payment Request API with a React high order componentPayment Request API with a React high order component
Payment Request API with a React high order component
 
BANK MANAGEMNT SYSTEM.pptx
BANK MANAGEMNT SYSTEM.pptxBANK MANAGEMNT SYSTEM.pptx
BANK MANAGEMNT SYSTEM.pptx
 
Inventory management system
Inventory  management  systemInventory  management  system
Inventory management system
 
Distributed banking system using rmi project
Distributed banking system using rmi projectDistributed banking system using rmi project
Distributed banking system using rmi project
 
I need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdfI need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdf
 
Building Simple C Program
Building Simple  C ProgramBuilding Simple  C Program
Building Simple C Program
 
CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   
 

More from lksoo

More from lksoo (20)

Lo48
Lo48Lo48
Lo48
 
Lo43
Lo43Lo43
Lo43
 
Lo37
Lo37Lo37
Lo37
 
Lo27
Lo27Lo27
Lo27
 
Lo17
Lo17Lo17
Lo17
 
Lo12
Lo12Lo12
Lo12
 
T3
T3T3
T3
 
T2
T2T2
T2
 
T1
T1T1
T1
 
T4
T4T4
T4
 
P5
P5P5
P5
 
P4
P4P4
P4
 
P3
P3P3
P3
 
P1
P1P1
P1
 
P2
P2P2
P2
 
L10
L10L10
L10
 
L9
L9L9
L9
 
L8
L8L8
L8
 
L7
L7L7
L7
 
L6
L6L6
L6
 

Lo39

  • 1. C++ Programming Assignment ATM Machine Phase 1 In this assignment you will create a program that allows a user to do the following: 1) Create a bank account by supplying a user id and password. 2) Login using their id and password. 3) Quit the program. Now if login was successful the user will be able to do the following: 1) Withdraw money. 2) Deposit money. 3) Request balance. 4) Quit the program. If login was not successful (for example the id or password did not match) then the user will be taken back to the introduction menu. This is what your program in action will look like: Hi! Welcome to Mr. Zamar’s ATM Machine! Please select an option from the menu below: l -> Login c -> Create New Account q -> Quit > l Please enter your user id: 12 Please enter your password 2345 ******** LOGIN FAILED! ******** Please select an option from the menu below: l -> Login c -> Create New Account q -> Quit > c Please enter your user name: 12 Please enter your password: 2345 Thank You! Your account has been created! l -> Login c -> Create New Account q -> Quit > l
  • 2. Please enter your user id: 12 Please enter your password: 2345 Access Granted! d -> Deposit Money w -> Withdraw Money r -> Request Balance > d Amount of deposit: $20 d -> Deposit Money w -> Withdraw Money r -> Request Balance > r Your balance is $20. d -> Deposit Money w -> Withdraw Money r -> Request Balance > w Amount of withdrawal: $2.5 d -> Deposit Money w -> Withdraw Money r -> Request Balance > r Your balance is $17.5. d -> Deposit Money w -> Withdraw Money r -> Request Balance > q Thanks for stopping by! Phase 1 of this project will require you complete the code found on the next page.
  • 3. // CODE STARTS HERE #include <iostream.h> #include <stdlib.h> // function prototypes void printIntroMenu(); void printMainMenu(); void start(); void login(); void createAccount(); // global variable (use this variable to store the user’s menu selection) char menuInput; // the main function int main() { // TO WRITE A WELCOME MESSAGE HERE // call the function start start(); return 0; } void printIntroMenu() { // WRITE CODE HERE } void printMainMenu() { // WRITE CODE HERE } void start() { // EXPLANATION OF CODE THAT GOES HERE IS BELOW } void createAccount() { // PHASE 2 } void login() { // PHASE 2 } // CODE ENDS HERE
  • 4. The function printIntroMenu() displays the following: Please select an option from the menu below: l -> Login c -> Create New Account q -> Quit > The function printMainMenu() displays the following menu: d -> Deposit Money w -> Withdraw Money r -> Request Balance q -> Quit > The function start() does the following: 1) Displays the following message, “Please select an option from the menu below: ” 2) Displays the introduction menu. Do this by calling the function you created earlier, printIntroMenu() 3) Program halts and waits for the user to make their selection. Use the cin >> function to accomplish this step. 4) Now use a switch statement to do the following: If the user types the character ‘l’ then the function login() is called If the user types the character ‘c’ then the function createAccount() is called. If the user types ‘q’ your program will terminate by calling the function exit(0)