SlideShare a Scribd company logo
1 of 17
As with all projects in this course, your program’s output will
display your name, your EUID, your e-mail address, the
department name, and course number. This means that your
program will print this information to the terminal (see the
sample output).
Declare and initialize the following constants and variables.
A global floating-point constant of type double to store the
minimum balance for the
business account initialized to 10000.00.
A global floating-point constant to of type double to store the
minimum balance for the
personal account initialized to 1000.00.
A global integer constant of type integer to store the length of
account number and
initialize it to 6.
A global integer constant of type integer to store the maximum
number of transactions
and initialize it to 20.
Declare an enumeration constant with values Business and
Personal and assign integer values 0
and 1 to the data items, respectively. They represent the type of
bank account.
Declare another enumeration constant with values Process,
Display and Quit, and assign suitable integer values 1, 2 and 3
to the data items, respectively. They represent menu choice
presented
to the user.
Write a
• •
•
•
Write a
• •
function named
getName
which gets the name on the bank account. Inside the function:
Using a suitable message, prompt the user for the name on the
account. The name can have multiple words.
Only alphabets (A-Z or a-z) and whitespaces are permitted in
the account name.
o If the user enters any other characters in the name, you need
to generate an error message and ask for the name again.
o
Yourprogrammustkeeponaskingtheusertoenterthenameuntiltheus
erentersit correctly.
(SEE SAMPLE OUTPUT 1)
The user may type the name in either uppercase or lowercase,
but you need to convert every initial to uppercase.
(SEE SAMPLE OUTPUTS)
This function will be called by the
main
function.
function named
getAccountNumber
which get the account number. Inside the function: Using a
suitable message, prompt the user for the number of the
account.
The account number must be a 6-digit number.
If the user enters an account number with more than 6 digits
generate an error message and ask the user to enter the number
again.
Only numbers 0-9 are permitted in the account number. If the
user enters an account number with non-numeric characters,
generate an error message, and ask the user to enter the number
again.
Your program must keep on asking the user to enter the number
until the user enters it correctly.
(SEE SAMPLE OUTPUTS 1 and 2)
This function will be called by the
main
function.
7. Write a function named
encrypt_num
. This function must receive the account number using a string
variable and encrypt the account number. Inside this function:
Declare an array of integers with size equal to the length of the
account number.
Using a loop of your choice, populate the array with seeded
randomly generated numbers
between 10 and 20 inclusive.
In a second loop, add the randomly generated number to the
characters in the account
•
8. Write a
•
• •
• •
number to offset each character by the random value.
oStore the new characters in a different string. This new string
is now your encrypted
account number.
This function will be called by the
main
function.
function named
display_transactions
. It accepts four parameters:
A 2D array of type double named transactions that stores the
transactions performed on the accounts. The number of columns
this 2D array is 2. The first column stores the business
transactions while the second column stores the personal
transactions. The maximum number of rows is limited to the
maximum number of transactions declared globally, but note
that the account may not have values for all 20 transactions.
Also note that the number of personal and business transactions
that are actually performed can be different.
An integer that represents the number of transactions to
display.
An enum variable that determines whether the account is a
Business account or a Personal Account.
A Boolean variable that determines if the transactions needed
to sorted while displaying. The default value of this Boolean is
false.
Inside this function:
o Display the content of the transactions array that relates to the
correct account type – Business and Personal (display the
correct column, not both columns).
o Sort if the default value has been overridden with true when
this function is called.
o Your numeric data must have two numbers after the decimal
point and a $ sign in front
of the number (for example, $1375.85).
• This function will be called by the
displayAccount
function.
9. Write a function named
displayAccount
.
• This function accepts three parameters.
•
10. Write a
•
• •
•
•
o A 2D array of type double named transactions that stores the
transactions performed on the accounts.
o An integer that represents the number of business transactions
to display.
o An integer that represents the number of personal
transactions to display.
Inside this function:
o Using a suitable message, ask the user which account needs
to be displayed – Business
or Personal.
o Using a suitable message, ask the user if the display needs to
be sorted.
o Based on the account type selected by a user, design a
switch-case block with a default
case, to implement the following features.
➢ You must use the enumeration constants to set up your cases.
➢ You must use a variable of your enumeration constant type
for switching control.
➢ If the user chooses a Business account, call function
display_transactions
with
suitable value of parameters.
➢ If the user chooses a Personal account, call function
display_transactions
with
suitable value of parameters.
➢ If the user enters a wrong choice, use the default case to
provide an error message
and ask the user to make the choice again.
➢ Your program needs to keep on asking the user for the
choice until the user chooses
a correct choice.
(SEE SAMPLE OUTPUT 1)
This function will be called by the
main
function.
function named
process_account.
It accepts five parameters:
o A 2D array of type double named transactions that stores the
transactions performed
on the accounts.
oAn integer that represents the number of business transactions
that has been
processed.
oAn integer that represents the number of personal transactions
that has been
processed.
o A double that represents the current business account
balance.
o A double that represents the current personal account
balance.
Inside this function:
Ask the user to choose which account the user wants to access
– Business or Personal.
o Use a suitable integer value to get the choice from the user.
Based on the choice of the user, design a switch case block to
implement the following requirements.
o You must use the enumeration constants to set up your cases.
o You must use a variable of your enumeration constant type
for switching control.
o If the user chooses a Business account
➢ Prompt the user for a transaction to process. The transaction
can be a positive or a negative value. Positive transactions are
deposits and negative transactions are withdrawals.
➢ If the current balance falls below the required minimum
balance for a business account, there is a 10$ penalty (decrease
current balance by $10 for every new
transaction) until the current balance updates to at least the
minimum required
balance.
(SEE SAMPLE OUTPUT 5)
➢ If the current balance is below the minimum required
balance, remind the user that
the account is losing 10$ for every transaction using a suitable
message.
(SEE
SAMPLE OUTPUT 5)
o If the user chooses a Personal account
➢ Prompt the user for a transaction to process. The transaction
can be a positive or a
negative value. Positive transactions are deposits and negative
transactions are
withdrawals.
➢ If any transaction drops the current balance below the
minimum personal balance,
the transaction will be denied with a suitable message to the
user.
➢ Note that for personal accounts the current balance will
never be less than the
minimum balance and hence there are no provision of penalties
either.
o If the user enters a wrong choice, use the default case to
provide an error message and
ask the user to make the choice again.
➢ Your program needs to keep on asking the user for the
choice until the user chooses
a correct choice.
(SEE SAMPLE OUTPUT 1)
oDisplay the current balance in either case after each
successful transaction.
(SEE
SAMPLE OUTPUTS)
➢ Your numeric data must have two numbers after the decimal
point and a $ sign in front of the number (for example,
$1375.85).
o This function needs be able to process more than one
transaction.
oAfter successfully processing a transaction, ask the user if the
user wants to process
another transaction.
o If the user chooses to process another transaction, use a
suitable loop to ask the user
about the type of account and the transaction to process.
(SEE SAMPLE OUTPUTS )
o If the user chooses to process additional transactions, the
previous transactions should
not be overwritten.
o Assume the user will not perform more than 20 transactions
on either account.
• This function will be called by the
main
function.
11. Inside your
main
function:
Declare a 2D array of doubles to store the transactions
performed on the account.
Display a menu for the user (SEE SAMPLE OUTPUT) that
provides the user three choices.
o Process an account
o Display the transactions on an account. o Quit the program
Declare a double variable to store the current personal account
balance and initialize it with the value 1000.00.
Declare a double variable to store the current business account
balance and initialize it with the value 10000.00.
Declare two integer variables to store the number of business
transactions and the number of personal transaction and
initialize both with 0.
Declare a string variable to store the name on the account.
o Call the
getName
function and pass the string variable for name to get the name.
Declare a string variable to store the account number.
o Call the
getAccountNumber
function and pass the string variable for account number to get
the account number.
Using a suitable message, ask the user to make the menu choice
using an integer variable.
Based on the value entered by the user for menu choice, design
a switch-case block to
implement the following requirements.
o You must use the enumeration constants to set up your cases.
o You must use a variable of your enumeration constant type
for switching control. o If the user chooses to process an
account
➢ Call the function
processAccount
with suitable parameters. o If the user chooses to display an
account
➢ Display the name with suitable message. Make sure the
displayed name follows all requirements of Step 5.
➢Display the encrypted account number with suitable message.
Call the
encrypt_num
function with appropriate arguments to encrypt the account
number.
➢ Call the function
displayAccount
with appropriate arguments. o If the user choose to quit the
program.
➢ Exit the program with a suitable message.
o If the user chooses anything else, execute the default case to
notify the user an incorrect
choice.
➢ Using a suitable loop, ask the use for the choice again.
➢ Your program must keep on looping until the user enters the
correct choice. (
SEE
SAMPLE OUTPUT 2
)
Your program source code should be named “
euidProject2.cpp
”, without the quotes.
where euid should be replaced by your EUID.
Your program will be graded based largely on whether it works
correctly on the CSE machines (e.g., cse01, cse02, ..., cse06),
so you should make sure that your program compiles and runs
on a CSE machine.
DESIGN (ALGORITHM):
On a piece of paper (or word processor), write down the
algorithm, or sequence of steps, that you will use to solve the
problem. You may think of this as a “recipe” for someone else
to follow. Continue to refine your “recipe” until it is clear and
deterministically solves the problem. Be sure to include the
steps for prompting for input, performing calculations, and
displaying output.
You should attempt to solve the problem by hand first (using a
calculator as needed) to work out what the answer should be for
a few sets of inputs.
Type these steps and calculations into a document (i.e., Word,
text, or PDF) that will be submitted along with your source
code. Note that if you do any work by hand, images (such as
pictures) may be used, but they must be clear and easily
readable. This document shall contain both the algorithm and
any supporting hand-calculations you used in verifying your
results.

More Related Content

Similar to As with all projects in this course, your program’s output wil.docx

9uukp6akqw2lv5envh1z signature-5baa6e8b45d29c39513027ab29197d68992c5a6634691d...
9uukp6akqw2lv5envh1z signature-5baa6e8b45d29c39513027ab29197d68992c5a6634691d...9uukp6akqw2lv5envh1z signature-5baa6e8b45d29c39513027ab29197d68992c5a6634691d...
9uukp6akqw2lv5envh1z signature-5baa6e8b45d29c39513027ab29197d68992c5a6634691d...Sandeep Mishra
 
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.pdfakbsingh1313
 
Income expense application in iOS
Income expense application in iOSIncome expense application in iOS
Income expense application in iOSmayur patel
 
Systems imlementation for Kasetsart University
Systems imlementation for Kasetsart University Systems imlementation for Kasetsart University
Systems imlementation for Kasetsart University Vinnie Tangsirikusolwong
 
SAP - Vendor Entries
SAP - Vendor EntriesSAP - Vendor Entries
SAP - Vendor EntriesKumar M.
 
TALLY.pptx for Beginners to study about the basics
TALLY.pptx for Beginners to study about the basicsTALLY.pptx for Beginners to study about the basics
TALLY.pptx for Beginners to study about the basicsncmsreejaj
 
Accenture fico interview-questions
Accenture fico interview-questionsAccenture fico interview-questions
Accenture fico interview-questionsprabhakar vanam
 
Comp 220 i lab 3 bank account lab report and source code
Comp 220 i lab 3 bank account lab report and source codeComp 220 i lab 3 bank account lab report and source code
Comp 220 i lab 3 bank account lab report and source codepradesigali1
 
Part I (Short Answer)1. In Java, what are the three different w.docx
Part I (Short Answer)1. In Java, what are the three different w.docxPart I (Short Answer)1. In Java, what are the three different w.docx
Part I (Short Answer)1. In Java, what are the three different w.docxherbertwilson5999
 
Chapter 7 posting journal entries to general ledger accounts
Chapter 7 posting journal entries to general ledger accountsChapter 7 posting journal entries to general ledger accounts
Chapter 7 posting journal entries to general ledger accountsIva Walton
 
Fi mm-integration doc
Fi mm-integration docFi mm-integration doc
Fi mm-integration docGiwa D. A
 
Sap fi-gl-step-by-step-material
Sap fi-gl-step-by-step-materialSap fi-gl-step-by-step-material
Sap fi-gl-step-by-step-materialkotakonda Murali
 
Massmaintenance
MassmaintenanceMassmaintenance
MassmaintenanceDavid Chan
 

Similar to As with all projects in this course, your program’s output wil.docx (19)

Tally project
Tally projectTally project
Tally project
 
9uukp6akqw2lv5envh1z signature-5baa6e8b45d29c39513027ab29197d68992c5a6634691d...
9uukp6akqw2lv5envh1z signature-5baa6e8b45d29c39513027ab29197d68992c5a6634691d...9uukp6akqw2lv5envh1z signature-5baa6e8b45d29c39513027ab29197d68992c5a6634691d...
9uukp6akqw2lv5envh1z signature-5baa6e8b45d29c39513027ab29197d68992c5a6634691d...
 
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
 
Income expense application in iOS
Income expense application in iOSIncome expense application in iOS
Income expense application in iOS
 
Tally
TallyTally
Tally
 
Systems imlementation for Kasetsart University
Systems imlementation for Kasetsart University Systems imlementation for Kasetsart University
Systems imlementation for Kasetsart University
 
SAP - Vendor Entries
SAP - Vendor EntriesSAP - Vendor Entries
SAP - Vendor Entries
 
Question
QuestionQuestion
Question
 
TALLY.pptx for Beginners to study about the basics
TALLY.pptx for Beginners to study about the basicsTALLY.pptx for Beginners to study about the basics
TALLY.pptx for Beginners to study about the basics
 
Accenture fico interview-questions
Accenture fico interview-questionsAccenture fico interview-questions
Accenture fico interview-questions
 
Test case, test sets and test scripts
Test case, test sets and test scriptsTest case, test sets and test scripts
Test case, test sets and test scripts
 
CDU iProcurement R12 Manual
CDU iProcurement R12 ManualCDU iProcurement R12 Manual
CDU iProcurement R12 Manual
 
Comp 220 i lab 3 bank account lab report and source code
Comp 220 i lab 3 bank account lab report and source codeComp 220 i lab 3 bank account lab report and source code
Comp 220 i lab 3 bank account lab report and source code
 
Autoact
AutoactAutoact
Autoact
 
Part I (Short Answer)1. In Java, what are the three different w.docx
Part I (Short Answer)1. In Java, what are the three different w.docxPart I (Short Answer)1. In Java, what are the three different w.docx
Part I (Short Answer)1. In Java, what are the three different w.docx
 
Chapter 7 posting journal entries to general ledger accounts
Chapter 7 posting journal entries to general ledger accountsChapter 7 posting journal entries to general ledger accounts
Chapter 7 posting journal entries to general ledger accounts
 
Fi mm-integration doc
Fi mm-integration docFi mm-integration doc
Fi mm-integration doc
 
Sap fi-gl-step-by-step-material
Sap fi-gl-step-by-step-materialSap fi-gl-step-by-step-material
Sap fi-gl-step-by-step-material
 
Massmaintenance
MassmaintenanceMassmaintenance
Massmaintenance
 

More from randymartin91030

Ask Michael E. Mark about his company’s procedures for making a big .docx
Ask Michael E. Mark about his company’s procedures for making a big .docxAsk Michael E. Mark about his company’s procedures for making a big .docx
Ask Michael E. Mark about his company’s procedures for making a big .docxrandymartin91030
 
ask an expertwww.NursingMadeIncrediblyEasy.com JanuaryFe.docx
ask an expertwww.NursingMadeIncrediblyEasy.com  JanuaryFe.docxask an expertwww.NursingMadeIncrediblyEasy.com  JanuaryFe.docx
ask an expertwww.NursingMadeIncrediblyEasy.com JanuaryFe.docxrandymartin91030
 
Ask clarifying or thought provoking questions.Provide personal or .docx
Ask clarifying or thought provoking questions.Provide personal or .docxAsk clarifying or thought provoking questions.Provide personal or .docx
Ask clarifying or thought provoking questions.Provide personal or .docxrandymartin91030
 
Asian American ResearchHello class, I hope this finds you all we.docx
Asian American ResearchHello class, I hope this finds you all we.docxAsian American ResearchHello class, I hope this finds you all we.docx
Asian American ResearchHello class, I hope this finds you all we.docxrandymartin91030
 
ASIAN CASE RESEARCH JOURNAL, VOL. 23, ISSUE 1, 153–191 (2019).docx
ASIAN CASE RESEARCH JOURNAL, VOL. 23, ISSUE 1, 153–191 (2019).docxASIAN CASE RESEARCH JOURNAL, VOL. 23, ISSUE 1, 153–191 (2019).docx
ASIAN CASE RESEARCH JOURNAL, VOL. 23, ISSUE 1, 153–191 (2019).docxrandymartin91030
 
Asian Americans had been excluded from entering the U.S. for more th.docx
Asian Americans had been excluded from entering the U.S. for more th.docxAsian Americans had been excluded from entering the U.S. for more th.docx
Asian Americans had been excluded from entering the U.S. for more th.docxrandymartin91030
 
Asia; Opera and Society and a DilemmaPlease respond to t.docx
Asia; Opera and Society and a DilemmaPlease respond to t.docxAsia; Opera and Society and a DilemmaPlease respond to t.docx
Asia; Opera and Society and a DilemmaPlease respond to t.docxrandymartin91030
 
Asian Academy of Management Journal, Vol. 18, No. 1, 1 –17, 20.docx
Asian Academy of Management Journal, Vol. 18, No. 1, 1 –17, 20.docxAsian Academy of Management Journal, Vol. 18, No. 1, 1 –17, 20.docx
Asian Academy of Management Journal, Vol. 18, No. 1, 1 –17, 20.docxrandymartin91030
 
Ashry 1Nedal AshryProf. GuzikENGL 301B15 February 20.docx
Ashry 1Nedal AshryProf. GuzikENGL 301B15 February 20.docxAshry 1Nedal AshryProf. GuzikENGL 301B15 February 20.docx
Ashry 1Nedal AshryProf. GuzikENGL 301B15 February 20.docxrandymartin91030
 
Ashford Graduate Intro Week Six Discussion Two 2 Examples.docx
Ashford Graduate Intro Week Six Discussion Two 2 Examples.docxAshford Graduate Intro Week Six Discussion Two 2 Examples.docx
Ashford Graduate Intro Week Six Discussion Two 2 Examples.docxrandymartin91030
 
Ashford 6 - Week 5 - Final ProjectFinal ProjectImagine that you.docx
Ashford 6 - Week 5 - Final ProjectFinal ProjectImagine that you.docxAshford 6 - Week 5 - Final ProjectFinal ProjectImagine that you.docx
Ashford 6 - Week 5 - Final ProjectFinal ProjectImagine that you.docxrandymartin91030
 
ASD Services ResourcesAutism ResourcesFlorida Department of H.docx
ASD Services ResourcesAutism ResourcesFlorida Department of H.docxASD Services ResourcesAutism ResourcesFlorida Department of H.docx
ASD Services ResourcesAutism ResourcesFlorida Department of H.docxrandymartin91030
 
ASCI 615 AviationAerospace Accident Investigation and.docx
ASCI 615 AviationAerospace Accident Investigation and.docxASCI 615 AviationAerospace Accident Investigation and.docx
ASCI 615 AviationAerospace Accident Investigation and.docxrandymartin91030
 
ASCM 631 – Integrative Supply Chain Management – Midterm Examinati.docx
ASCM 631 – Integrative Supply Chain Management – Midterm Examinati.docxASCM 631 – Integrative Supply Chain Management – Midterm Examinati.docx
ASCM 631 – Integrative Supply Chain Management – Midterm Examinati.docxrandymartin91030
 
ASB3109 Strategic ManagementYour Individual Assignment.docx
ASB3109 Strategic ManagementYour Individual Assignment.docxASB3109 Strategic ManagementYour Individual Assignment.docx
ASB3109 Strategic ManagementYour Individual Assignment.docxrandymartin91030
 
asapnursingProvide a Topic of Health Promotion Paper for App.docx
asapnursingProvide a Topic of Health Promotion Paper for App.docxasapnursingProvide a Topic of Health Promotion Paper for App.docx
asapnursingProvide a Topic of Health Promotion Paper for App.docxrandymartin91030
 
Asap Essay Need, it needs to be 4-5pages long. I really want to get .docx
Asap Essay Need, it needs to be 4-5pages long. I really want to get .docxAsap Essay Need, it needs to be 4-5pages long. I really want to get .docx
Asap Essay Need, it needs to be 4-5pages long. I really want to get .docxrandymartin91030
 
ASB 100Spring 2019Writing Assignment 3In this assignme.docx
ASB 100Spring 2019Writing Assignment 3In this assignme.docxASB 100Spring 2019Writing Assignment 3In this assignme.docx
ASB 100Spring 2019Writing Assignment 3In this assignme.docxrandymartin91030
 
asapnursingHealth policy unfolds daily and drives clinical p.docx
asapnursingHealth policy unfolds daily and drives clinical p.docxasapnursingHealth policy unfolds daily and drives clinical p.docx
asapnursingHealth policy unfolds daily and drives clinical p.docxrandymartin91030
 
Asam100bbXinyu ShangReading journal week1In the article Im.docx
Asam100bbXinyu ShangReading journal week1In the article Im.docxAsam100bbXinyu ShangReading journal week1In the article Im.docx
Asam100bbXinyu ShangReading journal week1In the article Im.docxrandymartin91030
 

More from randymartin91030 (20)

Ask Michael E. Mark about his company’s procedures for making a big .docx
Ask Michael E. Mark about his company’s procedures for making a big .docxAsk Michael E. Mark about his company’s procedures for making a big .docx
Ask Michael E. Mark about his company’s procedures for making a big .docx
 
ask an expertwww.NursingMadeIncrediblyEasy.com JanuaryFe.docx
ask an expertwww.NursingMadeIncrediblyEasy.com  JanuaryFe.docxask an expertwww.NursingMadeIncrediblyEasy.com  JanuaryFe.docx
ask an expertwww.NursingMadeIncrediblyEasy.com JanuaryFe.docx
 
Ask clarifying or thought provoking questions.Provide personal or .docx
Ask clarifying or thought provoking questions.Provide personal or .docxAsk clarifying or thought provoking questions.Provide personal or .docx
Ask clarifying or thought provoking questions.Provide personal or .docx
 
Asian American ResearchHello class, I hope this finds you all we.docx
Asian American ResearchHello class, I hope this finds you all we.docxAsian American ResearchHello class, I hope this finds you all we.docx
Asian American ResearchHello class, I hope this finds you all we.docx
 
ASIAN CASE RESEARCH JOURNAL, VOL. 23, ISSUE 1, 153–191 (2019).docx
ASIAN CASE RESEARCH JOURNAL, VOL. 23, ISSUE 1, 153–191 (2019).docxASIAN CASE RESEARCH JOURNAL, VOL. 23, ISSUE 1, 153–191 (2019).docx
ASIAN CASE RESEARCH JOURNAL, VOL. 23, ISSUE 1, 153–191 (2019).docx
 
Asian Americans had been excluded from entering the U.S. for more th.docx
Asian Americans had been excluded from entering the U.S. for more th.docxAsian Americans had been excluded from entering the U.S. for more th.docx
Asian Americans had been excluded from entering the U.S. for more th.docx
 
Asia; Opera and Society and a DilemmaPlease respond to t.docx
Asia; Opera and Society and a DilemmaPlease respond to t.docxAsia; Opera and Society and a DilemmaPlease respond to t.docx
Asia; Opera and Society and a DilemmaPlease respond to t.docx
 
Asian Academy of Management Journal, Vol. 18, No. 1, 1 –17, 20.docx
Asian Academy of Management Journal, Vol. 18, No. 1, 1 –17, 20.docxAsian Academy of Management Journal, Vol. 18, No. 1, 1 –17, 20.docx
Asian Academy of Management Journal, Vol. 18, No. 1, 1 –17, 20.docx
 
Ashry 1Nedal AshryProf. GuzikENGL 301B15 February 20.docx
Ashry 1Nedal AshryProf. GuzikENGL 301B15 February 20.docxAshry 1Nedal AshryProf. GuzikENGL 301B15 February 20.docx
Ashry 1Nedal AshryProf. GuzikENGL 301B15 February 20.docx
 
Ashford Graduate Intro Week Six Discussion Two 2 Examples.docx
Ashford Graduate Intro Week Six Discussion Two 2 Examples.docxAshford Graduate Intro Week Six Discussion Two 2 Examples.docx
Ashford Graduate Intro Week Six Discussion Two 2 Examples.docx
 
Ashford 6 - Week 5 - Final ProjectFinal ProjectImagine that you.docx
Ashford 6 - Week 5 - Final ProjectFinal ProjectImagine that you.docxAshford 6 - Week 5 - Final ProjectFinal ProjectImagine that you.docx
Ashford 6 - Week 5 - Final ProjectFinal ProjectImagine that you.docx
 
ASD Services ResourcesAutism ResourcesFlorida Department of H.docx
ASD Services ResourcesAutism ResourcesFlorida Department of H.docxASD Services ResourcesAutism ResourcesFlorida Department of H.docx
ASD Services ResourcesAutism ResourcesFlorida Department of H.docx
 
ASCI 615 AviationAerospace Accident Investigation and.docx
ASCI 615 AviationAerospace Accident Investigation and.docxASCI 615 AviationAerospace Accident Investigation and.docx
ASCI 615 AviationAerospace Accident Investigation and.docx
 
ASCM 631 – Integrative Supply Chain Management – Midterm Examinati.docx
ASCM 631 – Integrative Supply Chain Management – Midterm Examinati.docxASCM 631 – Integrative Supply Chain Management – Midterm Examinati.docx
ASCM 631 – Integrative Supply Chain Management – Midterm Examinati.docx
 
ASB3109 Strategic ManagementYour Individual Assignment.docx
ASB3109 Strategic ManagementYour Individual Assignment.docxASB3109 Strategic ManagementYour Individual Assignment.docx
ASB3109 Strategic ManagementYour Individual Assignment.docx
 
asapnursingProvide a Topic of Health Promotion Paper for App.docx
asapnursingProvide a Topic of Health Promotion Paper for App.docxasapnursingProvide a Topic of Health Promotion Paper for App.docx
asapnursingProvide a Topic of Health Promotion Paper for App.docx
 
Asap Essay Need, it needs to be 4-5pages long. I really want to get .docx
Asap Essay Need, it needs to be 4-5pages long. I really want to get .docxAsap Essay Need, it needs to be 4-5pages long. I really want to get .docx
Asap Essay Need, it needs to be 4-5pages long. I really want to get .docx
 
ASB 100Spring 2019Writing Assignment 3In this assignme.docx
ASB 100Spring 2019Writing Assignment 3In this assignme.docxASB 100Spring 2019Writing Assignment 3In this assignme.docx
ASB 100Spring 2019Writing Assignment 3In this assignme.docx
 
asapnursingHealth policy unfolds daily and drives clinical p.docx
asapnursingHealth policy unfolds daily and drives clinical p.docxasapnursingHealth policy unfolds daily and drives clinical p.docx
asapnursingHealth policy unfolds daily and drives clinical p.docx
 
Asam100bbXinyu ShangReading journal week1In the article Im.docx
Asam100bbXinyu ShangReading journal week1In the article Im.docxAsam100bbXinyu ShangReading journal week1In the article Im.docx
Asam100bbXinyu ShangReading journal week1In the article Im.docx
 

Recently uploaded

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 

Recently uploaded (20)

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 

As with all projects in this course, your program’s output wil.docx

  • 1. As with all projects in this course, your program’s output will display your name, your EUID, your e-mail address, the department name, and course number. This means that your program will print this information to the terminal (see the sample output). Declare and initialize the following constants and variables. A global floating-point constant of type double to store the minimum balance for the business account initialized to 10000.00. A global floating-point constant to of type double to store the minimum balance for the personal account initialized to 1000.00. A global integer constant of type integer to store the length of account number and initialize it to 6. A global integer constant of type integer to store the maximum number of transactions and initialize it to 20.
  • 2. Declare an enumeration constant with values Business and Personal and assign integer values 0 and 1 to the data items, respectively. They represent the type of bank account. Declare another enumeration constant with values Process, Display and Quit, and assign suitable integer values 1, 2 and 3 to the data items, respectively. They represent menu choice presented to the user. Write a • • • • Write a • •
  • 3. function named getName which gets the name on the bank account. Inside the function: Using a suitable message, prompt the user for the name on the account. The name can have multiple words. Only alphabets (A-Z or a-z) and whitespaces are permitted in the account name. o If the user enters any other characters in the name, you need to generate an error message and ask for the name again. o Yourprogrammustkeeponaskingtheusertoenterthenameuntiltheus erentersit correctly. (SEE SAMPLE OUTPUT 1) The user may type the name in either uppercase or lowercase, but you need to convert every initial to uppercase. (SEE SAMPLE OUTPUTS) This function will be called by the main function. function named getAccountNumber which get the account number. Inside the function: Using a suitable message, prompt the user for the number of the account. The account number must be a 6-digit number.
  • 4. If the user enters an account number with more than 6 digits generate an error message and ask the user to enter the number again. Only numbers 0-9 are permitted in the account number. If the user enters an account number with non-numeric characters, generate an error message, and ask the user to enter the number again. Your program must keep on asking the user to enter the number until the user enters it correctly. (SEE SAMPLE OUTPUTS 1 and 2) This function will be called by the main function. 7. Write a function named encrypt_num . This function must receive the account number using a string variable and encrypt the account number. Inside this function: Declare an array of integers with size equal to the length of the account number. Using a loop of your choice, populate the array with seeded
  • 5. randomly generated numbers between 10 and 20 inclusive. In a second loop, add the randomly generated number to the characters in the account • 8. Write a • • • • • number to offset each character by the random value. oStore the new characters in a different string. This new string is now your encrypted account number. This function will be called by the main function. function named
  • 6. display_transactions . It accepts four parameters: A 2D array of type double named transactions that stores the transactions performed on the accounts. The number of columns this 2D array is 2. The first column stores the business transactions while the second column stores the personal transactions. The maximum number of rows is limited to the maximum number of transactions declared globally, but note that the account may not have values for all 20 transactions. Also note that the number of personal and business transactions that are actually performed can be different. An integer that represents the number of transactions to display. An enum variable that determines whether the account is a Business account or a Personal Account. A Boolean variable that determines if the transactions needed to sorted while displaying. The default value of this Boolean is false. Inside this function: o Display the content of the transactions array that relates to the correct account type – Business and Personal (display the correct column, not both columns). o Sort if the default value has been overridden with true when this function is called. o Your numeric data must have two numbers after the decimal point and a $ sign in front
  • 7. of the number (for example, $1375.85). • This function will be called by the displayAccount function. 9. Write a function named displayAccount . • This function accepts three parameters. • 10. Write a • • • • • o A 2D array of type double named transactions that stores the transactions performed on the accounts. o An integer that represents the number of business transactions
  • 8. to display. o An integer that represents the number of personal transactions to display. Inside this function: o Using a suitable message, ask the user which account needs to be displayed – Business or Personal. o Using a suitable message, ask the user if the display needs to be sorted. o Based on the account type selected by a user, design a switch-case block with a default case, to implement the following features. ➢ You must use the enumeration constants to set up your cases. ➢ You must use a variable of your enumeration constant type for switching control. ➢ If the user chooses a Business account, call function display_transactions with suitable value of parameters. ➢ If the user chooses a Personal account, call function
  • 9. display_transactions with suitable value of parameters. ➢ If the user enters a wrong choice, use the default case to provide an error message and ask the user to make the choice again. ➢ Your program needs to keep on asking the user for the choice until the user chooses a correct choice. (SEE SAMPLE OUTPUT 1) This function will be called by the main function. function named process_account. It accepts five parameters: o A 2D array of type double named transactions that stores the transactions performed on the accounts. oAn integer that represents the number of business transactions that has been processed.
  • 10. oAn integer that represents the number of personal transactions that has been processed. o A double that represents the current business account balance. o A double that represents the current personal account balance. Inside this function: Ask the user to choose which account the user wants to access – Business or Personal. o Use a suitable integer value to get the choice from the user. Based on the choice of the user, design a switch case block to implement the following requirements. o You must use the enumeration constants to set up your cases. o You must use a variable of your enumeration constant type for switching control. o If the user chooses a Business account ➢ Prompt the user for a transaction to process. The transaction can be a positive or a negative value. Positive transactions are deposits and negative transactions are withdrawals. ➢ If the current balance falls below the required minimum balance for a business account, there is a 10$ penalty (decrease
  • 11. current balance by $10 for every new transaction) until the current balance updates to at least the minimum required balance. (SEE SAMPLE OUTPUT 5) ➢ If the current balance is below the minimum required balance, remind the user that the account is losing 10$ for every transaction using a suitable message. (SEE SAMPLE OUTPUT 5) o If the user chooses a Personal account ➢ Prompt the user for a transaction to process. The transaction can be a positive or a negative value. Positive transactions are deposits and negative transactions are withdrawals. ➢ If any transaction drops the current balance below the minimum personal balance,
  • 12. the transaction will be denied with a suitable message to the user. ➢ Note that for personal accounts the current balance will never be less than the minimum balance and hence there are no provision of penalties either. o If the user enters a wrong choice, use the default case to provide an error message and ask the user to make the choice again. ➢ Your program needs to keep on asking the user for the choice until the user chooses a correct choice. (SEE SAMPLE OUTPUT 1) oDisplay the current balance in either case after each successful transaction. (SEE SAMPLE OUTPUTS) ➢ Your numeric data must have two numbers after the decimal point and a $ sign in front of the number (for example, $1375.85). o This function needs be able to process more than one transaction.
  • 13. oAfter successfully processing a transaction, ask the user if the user wants to process another transaction. o If the user chooses to process another transaction, use a suitable loop to ask the user about the type of account and the transaction to process. (SEE SAMPLE OUTPUTS ) o If the user chooses to process additional transactions, the previous transactions should not be overwritten. o Assume the user will not perform more than 20 transactions on either account. • This function will be called by the main function. 11. Inside your main function: Declare a 2D array of doubles to store the transactions performed on the account. Display a menu for the user (SEE SAMPLE OUTPUT) that provides the user three choices. o Process an account
  • 14. o Display the transactions on an account. o Quit the program Declare a double variable to store the current personal account balance and initialize it with the value 1000.00. Declare a double variable to store the current business account balance and initialize it with the value 10000.00. Declare two integer variables to store the number of business transactions and the number of personal transaction and initialize both with 0. Declare a string variable to store the name on the account. o Call the getName function and pass the string variable for name to get the name. Declare a string variable to store the account number. o Call the getAccountNumber function and pass the string variable for account number to get the account number.
  • 15. Using a suitable message, ask the user to make the menu choice using an integer variable. Based on the value entered by the user for menu choice, design a switch-case block to implement the following requirements. o You must use the enumeration constants to set up your cases. o You must use a variable of your enumeration constant type for switching control. o If the user chooses to process an account ➢ Call the function processAccount with suitable parameters. o If the user chooses to display an account ➢ Display the name with suitable message. Make sure the displayed name follows all requirements of Step 5. ➢Display the encrypted account number with suitable message. Call the encrypt_num function with appropriate arguments to encrypt the account number. ➢ Call the function displayAccount with appropriate arguments. o If the user choose to quit the program. ➢ Exit the program with a suitable message.
  • 16. o If the user chooses anything else, execute the default case to notify the user an incorrect choice. ➢ Using a suitable loop, ask the use for the choice again. ➢ Your program must keep on looping until the user enters the correct choice. ( SEE SAMPLE OUTPUT 2 ) Your program source code should be named “ euidProject2.cpp ”, without the quotes. where euid should be replaced by your EUID. Your program will be graded based largely on whether it works correctly on the CSE machines (e.g., cse01, cse02, ..., cse06), so you should make sure that your program compiles and runs on a CSE machine. DESIGN (ALGORITHM):
  • 17. On a piece of paper (or word processor), write down the algorithm, or sequence of steps, that you will use to solve the problem. You may think of this as a “recipe” for someone else to follow. Continue to refine your “recipe” until it is clear and deterministically solves the problem. Be sure to include the steps for prompting for input, performing calculations, and displaying output. You should attempt to solve the problem by hand first (using a calculator as needed) to work out what the answer should be for a few sets of inputs. Type these steps and calculations into a document (i.e., Word, text, or PDF) that will be submitted along with your source code. Note that if you do any work by hand, images (such as pictures) may be used, but they must be clear and easily readable. This document shall contain both the algorithm and any supporting hand-calculations you used in verifying your results.