Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C programming: enum, structures..... Qn1. 20 Marks A leading Australian bank is maintaining its customer details based on the following database table structure. Customer Customer_ID

C programming: enum, structures.....image text in transcribedimage text in transcribed

Qn1. 20 Marks A leading Australian bank is maintaining its customer details based on the following database table structure. Customer Customer_ID Name Count of Accounts Ex: 1001 Amber 1 Ex: 1002 Aiden 2 Accounts Account_ID Customer_ID | Account_Type Balance Ex: A101 1001 Savings 1200 Ex: A102 1002 1002 Savings 1000 Ex: A103 1002 Cheque 800 The bank has approached you to develop a simple menu drive program to read and manage customers and account details. The bank has made the following requirements: a. The program should be menu-driven b. A customer could maintain zero (O) or more accounts c. Each account to be linked to a customer d. The types of accounts are Savings. Cheque, Credit, and Transaction e. Except for Savings, all other accounts can have negative balances f. Your program should be capable of creating and storing any number of customers with zero to fou accounts for each customer g. Your program should have the facility to search customer by customer name h. Your program should have the facility to calculate the total balance across all the accounts for a customer 1. Your program should have the facility to calculate the total balances across all the accounts ). The program should have the facility to display all customers and account details As part of this assessment, you are required to develop a C-language-based program to fulfil the above requirements. Your program should be based on the following instructions: a. Use appropriate C-language constructs to create customer records - Structures b. Use appropriate C-language constructs to create account records - Nested Structures C. Ensure your approach allows a customer to maintain 0 or many accounts d. Use enum to create account types e. Use dynamic memory allocation to create and maintain any number of customers and accounts. f. Total balance calculation should be done using Recursive Function COS10008 - Foundations of Technical Programming Enter the name of the customer: Amber Total balance: 1200 Enter the name of the customer: Aiden Total balance: 1800 On selection of option 5 in the main menu: 1. Add new member 2. Display all members 3. Search member by name 4. Calculate total balances for a customer 5. Calculate total premium 6. Exit On selection of option 5 from the main menu, the program to display the total balances of all the accounts. The total premium calculation should be implemented using Recursive Function. Total balance: 3000 On selection of option 6 in the main menu: 1. Add new member 2. Display all members 3. Search member by name 4. Calculate total balances for a customer 5. Calculate total premium 6. Exit On selection of option 5, the program should terminate. Qn2. 5 Marks Create a one-dimension array to read 20 alphabetical letters (your program should be able to detect and print out an error message if a non-alphabetical letter is inputted). As each letter is entered, print it only if it has been entered before. Write a function that can sort the array after all 20 letters have been entered. Write another function that print out the most frequent letter and number of time it was entered. Prepare for the case where all 20 letters are different, or all are the same. Use the smallest possible variables and minimum array size to solve the problem. Copyright: 2019 Swinburne University of Technology Assignment 2 CRICOS: 0011D TOD: 3059 10/12/2019 Page 5 of 10

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