Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Must be in c#: For this activity you will be creating the start of a terminal application that might be used by a bank teller.

Must be in c#:

For this activity you will be creating the start of a terminal application that might be used by a bank teller. You will create a CheckingAccount class that contains a balance and a Customer class that has a CheckingAccount. The program will feature a menu that has the option of creating a customer, creating a checking account, setting the account balance, displaying the account balance, and exiting the program. The program only has to keep track of a single Customer and the Customer only has to have a single account.

Use the following guidelines to complete this application:

Classes

Create a CheckingAccount classCheckingAccount must have the following fields

a Decimal field for the account balance.

a int field for the account number.

Create a Customer classCustomer must have the following fields

a CheckingAccount field for the customers account

a string field for the customers name

Constructors

CheckingAccount needs a constructor that takes an int parameter and a decimal parameter

These parameters should be assigned to the appropriate fields.

Customer needs a constructor that takes a string parameter

This parameter should be assigned to the appropriate field.

Main

In main before anything else you will need a Customer variable to use for the currentCustomer.

Program runs until the user chooses to exit.

Menu

The menu must have the following options:

Create customer - this option needs to prompt the user for a customer name, use that input to instantiate a new Customer object, and assign that object to the currentCustomer variable.

Create account - this option should only run if currentCustomer isnt null, it needs to prompt the user for values to create a CheckingAccount with, use those values to instantiate a new CheckingAccount object and assign it to the currentCustomer.

Set account balance - this option should only run if currentCustomer isnt null and currentCustomers account isnt null, it needs to prompt the user for a new account balance and then apply it to currentCustomers account.

Display account balance - this option needs to display the current customers account balance.

Exit - stop the program.

Input Validation

Users input must be validated.

The user must not be able to crash your program by entering invalid values.

Extra Information

Go back through your code and check for the following:

All variables and methods are named appropriately.

Any information being output to the user should be clear and concise.

The user should be clearly informed of what is occurring throughout the application.

Make sure nothing accesses an object that doesnt exist.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions