I need a cpp coding expert

Closed Posted 2 years ago Paid on delivery
Closed Paid on delivery

1.8 HW5

This homework assignment gives you the opportunity to practice nested structures, passing a structure by reference, and dynamic allocation of an array of structures. There is an extra credit version worth an additional 5 points.

HW5 (Graded out of 100)

Write a program that manages bank accounts. Specifically, the program allows the user to enter the data related to an account, and list the data related to accounts. The data related to an account is maintained in the following structures:

struct Person

{

string name;

string address;

};

struct Account

{

int accountNumber;

Person ownerInfo;

double balance;

};

1. Additional Requirements – Make sure you meet all the requirements to avoid losing points

a) Outline of main

Prompt the user to enter the maximum number of Accounts. Perform input validation. A valid value is an integer > 0.

Dynamically allocate an array of Accounts of the size entered by the user

Display the menu of choices:

1->Enter data for specific account, 2->Display data for specific account

3->Display data for all accounts, 4->Quit

Perform input validation on the user’s choice. A user’s choice is valid if it is a choice on the menu.

If the user chooses 1, prompt the user for the account data, do input validation on the account number and balance, and populate the next available element of the Account array. The next available element is the lowest index element that is not populated. If there is no available element (array is full), print an error message. Then display the menu again.

If the user chooses 2, prompt the user for the account number. Perform input validation. If there is no account with that number, print an error message. Else, display the data related to the account. Then display the menu again.

If the user chooses 3, print the data of all the accounts that have been populated. Then display the menu again.

If the user chooses 4, terminate the program.

For all the above input validations, the program should ask the user to reenter as long as the input is invalid, up to 5 attempts (the initial input counts as one attempt). If the maximum number of attempts is reached, the program prints an error message and terminates.

An account number is valid if it is an integer > 0

A balance is valid is it consists only of digits and at most one dot. If there is a dot, there are at most two digits after the dot.

b) Functions

You are required to implement your program with these functions. You may implement more functions to make your program more modular if you wish.

• populateAccount: This function takes as arguments the array of Accounts, the number of Accounts populated so far passed by reference, and the size of the array passed by value. It prompts the user for the data and populates the next available element of the Account array. It performs all the necessary input validations. It prints an error message if there is no available element. The function returns void.

• printAccount: This function takes as argument an Account structure variable passed by reference. It prints the content of the structure variable. The function returns void.

For the two above functions, you must use the proper qualifier(s) to comply with the principle of least privilege. You will fail the unit test if you don’t comply with the principle of least privilege.

c) Style

Make sure you follow the style requirements, especially regarding the comment header for functions, and use function prototypes for all your functions, to avoid losing points.

2. Implementation Suggestions – You are not required to implement the suggestions

For the input validation, you can use getline to read the user’s input.

You are allowed to use any of the existing library functions in chapter 10 of the Gaddis textbook to check input validity. You are also allowed to reuse code that you wrote for the previous homeworks.

.

C Programming

Project ID: #31818624

About the project

15 proposals Remote project Active 2 years ago

15 freelancers are bidding on average $27 for this job

urmate

Hi I have checked your project description. I have excellent programming and development skills. Contact me with all the details and requirements for your project for further discussion. I will provide you with dedica More

$30 USD in 1 day
(110 Reviews)
5.8
CodingHelpLine

Hello Sir/Madam I have development experience in various Programming Languages, OOP, Data Structures, Database Driven applications, APIs, Files handling and Data Transformation, ETL and various frameworks. I assure y More

$25 USD in 2 days
(94 Reviews)
6.0
lechaantonov333

Hi I have a good skill in C/C++, C#, JAVA and python programing. I have finished many projects using C/C++, C#, JAVA and python. I can do it perfectly in your timeline. Let's discuss more details in private chat. Thank More

$20 USD in 7 days
(26 Reviews)
5.3
TechnologySol20

###### Experienced in C, C++, Java, Python, Data structure, Algorithm Design and Analysis, Linux ######## Hi, Greetings. I am a computer engineer having masters in Mathematics, Computer Science and PhD in Computer S More

$25 USD in 2 days
(63 Reviews)
5.5
gowthamsarathy

Hi there Yes I am Porgramming Expert and I can do this one ASAP (within 2 to hours) Kindly send me a message we'll discuss further Looking forward to hear you Thank you.

$20 USD in 1 day
(101 Reviews)
5.2
popularcontent12

Hello, I am a software and Web Developer. I hava also lot of experience in Designing. I have some rules and regulations before start of project: 1. Provide 100% work within deadline. 2. Provide unlimited revisions un More

$10 USD in 1 day
(32 Reviews)
4.5
tyuturkinnik

Dear client! I have just read your project in detail If you hire me, you can get good result from me. Kindly chat me up and give me a fair chance to deliver the best result to you! Thanks best regards.

$20 USD in 7 days
(20 Reviews)
4.4
DaniilLakman

Dear client! I have just read your project in detail and I have rich experiences about your project. I can finish your project perfectly, on time. I am the best freelancer for the job. If you hire me, you can get go More

$20 USD in 1 day
(10 Reviews)
3.8
Abuzar16nucs

Hello Sir, Thanks for posting this job and giving me an opportunity to perform my best. I am interested in the project. I am ready to start it now. I will complete it very shortly. I have expertise in the C/C++ Progr More

$20 USD in 2 days
(8 Reviews)
3.4
veenitshukla20

I have created the program once before also I can complete it one day. I have over 4+ years of experience in C/C++, Data Structures, and algorithms.

$15 USD in 1 day
(3 Reviews)
1.8
aykutq

Dear Client, I’m an expert in C/C++, I have done lots of projects in fields such as graphics programming, embedded systems, low latency systems etc. Hence, I think that I will be best choice for your project in order t More

$20 USD in 1 day
(0 Reviews)
0.0
shawon0709

Hi I checked your project details. I have a good skill in C/C++, C#, JAVA and python programing. I can do it perfectly in your timeline. I have excellent programming skill. I can assure you that I will provide you wit More

$15 USD in 3 days
(0 Reviews)
0.0
anushka03367

Hello, I have read your job post and I am interested in the same. I have a B. Tech (Computer Science) and MBA from the very best universities in the country with an acceptance rate of 0.01% of the applicants. I have b More

$125 USD in 7 days
(0 Reviews)
0.0
jayvyas20

hey,im jay, im a fresher i would love to do your project, im know c,c++,and python very well,it will be a great honor for me if i start my professional journey with you. contect/whatsapp no:- +918866835678

$20 USD in 7 days
(0 Reviews)
0.0