0% found this document useful (0 votes)
21 views2 pages

Group Assignment

Uploaded by

Tsega Mesfin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views2 pages

Group Assignment

Uploaded by

Tsega Mesfin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Hawassa University

College of Medicine
Department of Health Informatics
Fundamental of programming in C++ Group Assignment (20%)

1. Write a program that creates a two-dimensional array initialized with test data. Use any data
type you wish. The program should have the following functions.
getTotal. This function should accept a two-dimensional array as its argument and return
the total of all the values in the array.
getAverage. This function should accept a two-dimensional array as its argument and
return the average of all the values in the array.
getRowTotal. This function should accept a two-dimensional array as its first argument
and an integer as its second argument. The second argument should be the subscript of a
row in the array. The function should return the total of the values in the specified row.
getColumnTotal. This function should accept a two-dimensional array as its first
argument and an integer as its second argument. The second argument should be the
subscript of a column in the array. The function should return the total of the values in
the specified column.
2. Write C++ program for a mini banking system with functions to display menu, create account,
deposit and withdraw money using array of structures.
The menu function display options to create account, to deposit amount, to withdraw
amount and to exit.
The create account function creates account for a customer by accepting first name and
last name from the user. While creating a new account, the first saving is 25birr and
account number is automatically generated by the program.
The deposit function accepts the account number and the amount from the user and if the
account exist it adds the amount with that account previous balance else it displays an
error message.
The withdraw function also accepts the account number and amount from the user. Then
it searches for that account and check if the balance in that account is adequate enough
to withdraw. Otherwise, it displays an error message.
3. Develop a calculator program that can perform basic arithmetic operations like addition,
subtraction, multiplication, division, and Modulus.
4. Develop a program that helps manage student information, including features like adding
students, displaying student details, calculating grades, and generating Grade reports.
5. Write a program that dynamically allocates an array large enough to hold a user-defined
number of test scores. Once all the scores are entered, the array should be passed to a function
that sorts them in ascending order. Another function should be called that calculates the
average score. The program should display the sorted list of scores and averages with
appropriate headings. Use pointer notation rather than array notation whenever possible.
Input Validation: Do not accept negative numbers for test scores

You might also like