computer science project

In this project, you have to write a C++ program to keep track of banking transactions.
Your objective is to get transactions from a user and process the transactions for debiting or crediting the account, keeping in view the rules regarding minimum balances and penalties. Each user holds two accounts – a business account and a personal account. Both accounts use the same account number.

CSCE 1030: Project 1

Don't use plagiarized sources. Get Your Custom Essay on
computer science project
Just from $13/Page
Order Essay

Due: 11:59 PM on Sunday, February 21, 2021

PROGRAM DESCRIPTION

In this project, you have to write a C++ program to keep track of banking transactions.

Your objective is to get transactions from a user and process the transactions for debiting or crediting the

account, keeping in view the rules regarding minimum balances and penalties. Each user holds two

accounts – a business account and a personal account. Both accounts use the same account number.

PROGRAM REQUIREMENTS

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

2. Declare and initialize the following constants and variables.

 A floating-point constant to store the minimum balance for the business account

initialized

to 10000.00.

 A floating-point constant to store the minimum balance for the personal account

initialized

to 1000.00.

 A floating-point variable to store the current balance for the business account initialized

to 10000.00.

 A floating-point variable to store the current balance for the personal account initialized

to 1000.00.

3. Declare an enumeration constant with values Business and Personal and assign suitable integer

values to each data item.

4. 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 Your program must keep on asking the user to enter the name until the user

enters it 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)

5. 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 any other account

number, 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 OUTPUT 1)

6. Inside a switch-case block with a default case, implement the following features.

 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.

 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

o 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.

o 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 3)

o 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 3)

 If the user chooses a Personal account

o 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.

o If any transaction drops the current balance below the minimum personal

balance, the transaction will be denied with a suitable message to the user. (SEE

SAMPLE OUTPUT 2)

o 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

 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.

o Your program needs to keep on asking the user for the choice until the user
chooses a correct choice. (SEE SAMPLE OUTPUT 1)

 Display the current balance in either case after each successful transaction. (SEE SAMPLE
OUTPUTS)

7. Your program needs be able to process more than one transaction.

 After successfully processing a transaction, ask the user if the user wants to process
another transaction.

 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 (i.e. basically repeat Step 6).
(SEE SAMPLE OUTPUT 4)

8. Display the following results to the user with suitable messages.

 The name on the account. Note that the displayed name must reflect the processing of
Step 4.

 The account number of the account but in encrypted form.
o Increment the actual account number with a seeded random integer between

200001 and 300000, inclusive
o Note that the addition may increase a 6 digit number to a 7 digit number, in that

case discard the first digit.
o For example, if the actual account number is 999999 and the randomly generated

number is 300000, the sum is 1299999 and the encrypted account number is
299999, with the leading 7th digit discarded.

 The current business and personal account balances.

o Make sure the number of digits after the decimal point is 2 digits and there is a $
sign in front of the number (for example, $12562.65 )

9. Your program source code should be named “euidProject1.cpp”, without the quotes.
where euid should be replaced by your EUID.

10. 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.

Here are some sample outputs to help you write the code. The items in bold are entered by the user on
the terminal as input data.

SAMPLE OUTPUT 1

$ ./a.out

+————————————————-+

| Computer Science and Engineering |

| CSCE 1030 – Computer Science I |

| Student Name EUID euid@my.unt.edu |

+————————————————-+

Enter your name:John7 smith

Your name can only have alphabets or spaces. Enter again.

Enter your name:john c smit%

Your name can only have alphabets or spaces. Enter again.

Enter your name:john c smith

Enter your account number:25689745

Your account number is a 6-digit number. Enter again:55

Your account number is a 6-digit number. Enter again:123456

What is your account type?0 for Business, 1 for Personal:3

Wrong choice. Please enter again.

What is your account type?0 for Business, 1 for Personal:8

Wrong choice. Please enter again.

What is your account type?0 for Business, 1 for Personal:0

Enter transaction:2000

Business Balance:$12000

Do you want to process another transaction? Y/N:n

Name:John C Smith

Account Number (Encrypted):394797

Business Balance:$12000.00

Personal Balance:$1000.00

SAMPLE OUTPUT 2

$ ./a.out
+————————————————-+

| Computer Science and Engineering |
| CSCE 1030 – Computer Science I |
| Student Name EUID euid@my.unt.edu |
+————————————————-+

Enter your name:John Smith

Enter your account number:999999

What is your account type?0 for Business, 1 for Personal:1

Enter transaction:-10000

Your personal balance cannot be less than minimum balance. Transaction

denied.

Personal Balance:$1000

Do you want to process another transaction? Y/N:n

Name:John Smith

Account Number (Encrypted):271340

Business Balance:$10000.00

Personal Balance:$1000.00

SAMPLE OUTPUT 3

$ ./a.out
+————————————————-+
| Computer Science and Engineering |
| CSCE 1030 – Computer Science I |
| Student Name EUID euid@my.unt.edu |
+————————————————-+

Enter your name:sheila HARRIS

Enter your account number:555555

What is your account type?0 for Business, 1 for Personal:0

Enter transaction:-50000

Business Balance:$-40000

Do you want to process another transaction? Y/N:y

What is your account type?0 for Business, 1 for Personal:0

Enter transaction:10000

Your balance is less than the required minimum. There will be a $10.00

fee for every transaction.

Business Balance:$-30010

Do you want to process another transaction? Y/N:y
What is your account type?0 for Business, 1 for Personal:0
Enter transaction:-10000

Your balance is less than the required minimum. There will be a $10.00
fee for every transaction.

Business Balance:$-40020

Do you want to process another transaction? Y/N:y
What is your account type?0 for Business, 1 for Personal:0

Enter transaction:100000

Your balance is less than the required minimum. There will be a $10.00
fee for every transaction.

Business Balance:$59970

Do you want to process another transaction? Y/N:y
What is your account type?0 for Business, 1 for Personal:0

Enter transaction:5000

Business Balance:$64970

Do you want to process another transaction? Y/N:n

Name:Sheila HARRIS

Account Number (Encrypted):851179

Business Balance:$64970.00

Personal Balance:$1000.00

SAMPLE OUTPUT 4

$ ./a.out
+————————————————-+
| Computer Science and Engineering |
| CSCE 1030 – Computer Science I |
| Student Name EUID euid@my.unt.edu |
+————————————————-+

Enter your name:abcd efgh

Enter your account number:100000

What is your account type?0 for Business, 1 for Personal:0
Enter transaction:10000

Business Balance:$20000

Do you want to process another transaction? Y/N:y
What is your account type?0 for Business, 1 for Personal:1
Enter transaction:2000

Personal Balance:$3000

Do you want to process another transaction? Y/N:n

Name:Abcd Efgh

Account Number (Encrypted):371341

Business Balance:$20000.00

Personal Balance:$3000.00

TESTING:
Test your program to check that it operates as desired with a variety of inputs. Then, compare the answers
your code gives with the ones you get from hand calculations.

SUBMISSION:

 Your program will be graded based largely upon whether it works correctly on the CSE machines,
so you should make sure your program compiles and runs on the CSE machines.

 Your program will also be graded based upon your program style. This means that you should use
comments (as directed), meaningful variable names, and a consistent indentation style as
recommended in the textbook and in class.

 We will be using an electronic homework submission on Canvas to make sure that all students
hand their programming projects on time. You will submit both (1) the program source code file
and (2) the algorithm design document to the Project 1 dropbox on Canvas by the due date and
time.

 Homework are meant to be problem-solving exercises and are designed to help you practice your
coding on larger projects with various pieces of functionality. While the coding should be primarily
your sole work, you are allowed to get assistance from classmates when working on these
assignments. However, each student is required to report the name(s) of the students they
worked with on the assignment. Cheating for these assignments is now defined as copying from
a fellow student without reporting it or copying from the web. You should not copy someone
else’s code or let a classmate examine your code if you have not identified as working in a group
for your homework.

 As a safety precaution, do not edit your program (using vim or nano) after you have submitted

your program where you might accidentally re-save the program, causing the timestamp on your

file to be later than the due date. If you want to look (or work on it) after submitting, make a copy

of your submission and work on that copy. Should there be any issues with your submission, this

timestamp on your code on the CSE machines will be used to validate when the program was

completed.

What Will You Get?

We provide professional writing services to help you score straight A’s by submitting custom written assignments that mirror your guidelines.

Premium Quality

Get result-oriented writing and never worry about grades anymore. We follow the highest quality standards to make sure that you get perfect assignments.

Experienced Writers

Our writers have experience in dealing with papers of every educational level. You can surely rely on the expertise of our qualified professionals.

On-Time Delivery

Your deadline is our threshold for success and we take it very seriously. We make sure you receive your papers before your predefined time.

24/7 Customer Support

Someone from our customer support team is always here to respond to your questions. So, hit us up if you have got any ambiguity or concern.

Complete Confidentiality

Sit back and relax while we help you out with writing your papers. We have an ultimate policy for keeping your personal and order-related details a secret.

Authentic Sources

We assure you that your document will be thoroughly checked for plagiarism and grammatical errors as we use highly authentic and licit sources.

Moneyback Guarantee

Still reluctant about placing an order? Our 100% Moneyback Guarantee backs you up on rare occasions where you aren’t satisfied with the writing.

Order Tracking

You don’t have to wait for an update for hours; you can track the progress of your order any time you want. We share the status after each step.

image

Areas of Expertise

Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.

Areas of Expertise

Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.

image

Trusted Partner of 9650+ Students for Writing

From brainstorming your paper's outline to perfecting its grammar, we perform every step carefully to make your paper worthy of A grade.

Preferred Writer

Hire your preferred writer anytime. Simply specify if you want your preferred expert to write your paper and we’ll make that happen.

Grammar Check Report

Get an elaborate and authentic grammar check report with your work to have the grammar goodness sealed in your document.

One Page Summary

You can purchase this feature if you want our writers to sum up your paper in the form of a concise and well-articulated summary.

Plagiarism Report

You don’t have to worry about plagiarism anymore. Get a plagiarism report to certify the uniqueness of your work.

Free Features $66FREE

  • Most Qualified Writer $10FREE
  • Plagiarism Scan Report $10FREE
  • Unlimited Revisions $08FREE
  • Paper Formatting $05FREE
  • Cover Page $05FREE
  • Referencing & Bibliography $10FREE
  • Dedicated User Area $08FREE
  • 24/7 Order Tracking $05FREE
  • Periodic Email Alerts $05FREE
image

Our Services

Join us for the best experience while seeking writing assistance in your college life. A good grade is all you need to boost up your academic excellence and we are all about it.

  • On-time Delivery
  • 24/7 Order Tracking
  • Access to Authentic Sources
Academic Writing

We create perfect papers according to the guidelines.

Professional Editing

We seamlessly edit out errors from your papers.

Thorough Proofreading

We thoroughly read your final draft to identify errors.

image

Delegate Your Challenging Writing Tasks to Experienced Professionals

Work with ultimate peace of mind because we ensure that your academic work is our responsibility and your grades are a top concern for us!

Check Out Our Sample Work

Dedication. Quality. Commitment. Punctuality

Categories
All samples
Essay (any type)
Essay (any type)
The Value of a Nursing Degree
Undergrad. (yrs 3-4)
Nursing
2
View this sample

It May Not Be Much, but It’s Honest Work!

Here is what we have achieved so far. These numbers are evidence that we go the extra mile to make your college journey successful.

0+

Happy Clients

0+

Words Written This Week

0+

Ongoing Orders

0%

Customer Satisfaction Rate
image

Process as Fine as Brewed Coffee

We have the most intuitive and minimalistic process so that you can easily place an order. Just follow a few steps to unlock success.

See How We Helped 9000+ Students Achieve Success

image

We Analyze Your Problem and Offer Customized Writing

We understand your guidelines first before delivering any writing service. You can discuss your writing needs and we will have them evaluated by our dedicated team.

  • Clear elicitation of your requirements.
  • Customized writing as per your needs.

We Mirror Your Guidelines to Deliver Quality Services

We write your papers in a standardized way. We complete your work in such a way that it turns out to be a perfect description of your guidelines.

  • Proactive analysis of your writing.
  • Active communication to understand requirements.
image
image

We Handle Your Writing Tasks to Ensure Excellent Grades

We promise you excellent grades and academic excellence that you always longed for. Our writers stay in touch with you via email.

  • Thorough research and analysis for every order.
  • Deliverance of reliable writing service to improve your grades.
Place an Order Start Chat Now
image

Order your essay today and save 30% with the discount code Happy