SlideShare uma empresa Scribd logo
1 de 4
Baixar para ler 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)

Mais conteúdo relacionado

Semelhante a A09

Banks offer various types of accounts, such as savings, checking, cer.pdf
 Banks offer various types of accounts, such as savings, checking, cer.pdf Banks offer various types of accounts, such as savings, checking, cer.pdf
Banks offer various types of accounts, such as savings, checking, cer.pdf
akbsingh1313
 
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
mattinsonjanel
 
Please distinguish between the .h and .cpp file, create a fully work.pdf
Please distinguish between the .h and .cpp file, create a fully work.pdfPlease distinguish between the .h and .cpp file, create a fully work.pdf
Please distinguish between the .h and .cpp file, create a fully work.pdf
neerajsachdeva33
 
"Bank management system"
"Bank management system""Bank management system"
"Bank management system"
vivek kct
 
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
rajeshjangid1865
 
Kier senior team visits presentation v1 master
Kier senior team visits presentation v1 masterKier senior team visits presentation v1 master
Kier senior team visits presentation v1 master
DollyParker
 
BizSmart Corporate Back Office Guide
BizSmart Corporate Back Office GuideBizSmart Corporate Back Office Guide
BizSmart Corporate Back Office Guide
AllianceBankMY
 

Semelhante a A09 (20)

Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
 
Cpe%20ppt (1).pptx
Cpe%20ppt (1).pptxCpe%20ppt (1).pptx
Cpe%20ppt (1).pptx
 
Banks offer various types of accounts, such as savings, checking, cer.pdf
 Banks offer various types of accounts, such as savings, checking, cer.pdf Banks offer various types of accounts, such as savings, checking, cer.pdf
Banks offer various types of accounts, such as savings, checking, cer.pdf
 
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 programming
C programmingC programming
C programming
 
Please distinguish between the .h and .cpp file, create a fully work.pdf
Please distinguish between the .h and .cpp file, create a fully work.pdfPlease distinguish between the .h and .cpp file, create a fully work.pdf
Please distinguish between the .h and .cpp file, create a fully work.pdf
 
"Bank management system"
"Bank management system""Bank management system"
"Bank management system"
 
Bank Management System
Bank Management SystemBank Management System
Bank Management System
 
Bank management system
Bank management systemBank management system
Bank management system
 
ATM UI prototyping
ATM UI prototypingATM UI prototyping
ATM UI prototyping
 
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
 
Section B Exercise Slides 3 windows 2003
Section B Exercise Slides 3 windows 2003Section B Exercise Slides 3 windows 2003
Section B Exercise Slides 3 windows 2003
 
hotel managment system (1)
hotel managment system (1)hotel managment system (1)
hotel managment system (1)
 
Bank Management System.pptx
Bank Management System.pptxBank Management System.pptx
Bank Management System.pptx
 
Kier senior team visits presentation v1 master
Kier senior team visits presentation v1 masterKier senior team visits presentation v1 master
Kier senior team visits presentation v1 master
 
BANK MANAGEMNT SYSTEM.pptx
BANK MANAGEMNT SYSTEM.pptxBANK MANAGEMNT SYSTEM.pptx
BANK MANAGEMNT SYSTEM.pptx
 
Atm Simulator
Atm SimulatorAtm Simulator
Atm Simulator
 
Atm Simulator
Atm SimulatorAtm Simulator
Atm Simulator
 
BizSmart Corporate Back Office Guide
BizSmart Corporate Back Office GuideBizSmart Corporate Back Office Guide
BizSmart Corporate Back Office Guide
 

Mais de 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
 

Último

Último (20)

COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 

A09

  • 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)