0% found this document useful (0 votes)
129 views

Atilim University Department of Computer Engineering CMPE 114 Computer Programming - II 2020-2021 SUMMER Assignment II-Strings & Structures

This document provides instructions for an assignment to write a C program that reads basketball player information into a structure array and finds the Most Valuable Player (MVP). The program is to define a structure for players, input numbers of players and their info, compute efficiency scores, output scores and the MVP with the highest score. A function is also to be written to find the MVP from the player structure array.

Uploaded by

ss
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)
129 views

Atilim University Department of Computer Engineering CMPE 114 Computer Programming - II 2020-2021 SUMMER Assignment II-Strings & Structures

This document provides instructions for an assignment to write a C program that reads basketball player information into a structure array and finds the Most Valuable Player (MVP). The program is to define a structure for players, input numbers of players and their info, compute efficiency scores, output scores and the MVP with the highest score. A function is also to be written to find the MVP from the player structure array.

Uploaded by

ss
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

ATILIM UNIVERSITY

Department of Computer Engineering


CMPE 114 Computer Programming - II
2020-2021 SUMMER
Assignment II- Strings & Structures
Due date: September 1, 2021 Wednesday 23.59

Write a C program that reads basketball players’ information into an array of structures and
find the Most Valuable Player (MVP) of the team by using a function.

• Define a structure for a player. Each player should have a number, name, surname,
along with their points, rebounds, blocks of type integer and efficiency score of type
double.

In the main program:

• Input the number of players (n) in the team.


• Define an array of structure for n players.
• Read the information of players (no, name, surname, points, rebounds and blocks) into
an array of structures.
• Computes Efficiency scores for each player as 50% of points + 30% of rebounds + %20 of
blocks.
• Then, the program outputs the no, Surname, name initial (first letter of the name) and
their efficiency score in the format “No Surname, N. [Efficiency Score]” as shown in the
Sample Run. (Note that the words entered can be in small-case or capital letters. You
should use character functions).
• Call the function to find the most valuable player, having the highest efficiency score.

In the function:

• Write a function named find_mvp which gets two parameters, player p as a structure
and the size of the array.
• The function finds the player with highest efficiency and outputs the name and surname
of that player as MVP.
SAMPLE RUN:
How many players?:3

Enter Player 1 info:70 LuiGi DATOme 40 20 5


Enter Player 2 info:35 BobBy Dixon 55 25 10
Enter Player 3 info:24 JaN VeseLY 50 30 10

The efficiency scores of players:


#70 Datome, L. 27.00
#35 Dixon, B. 37.00
#24 Vesely, J. 36.00

The MVP of the team is: Dixon, B.

IMPORTANT NOTES:

• Cheating will NOT be tolerated. Special software will be used to verify if the submitted
homework is your original work or copied from someone/somewhere else. If any case of
cheating is detected, at any time, you will get ZERO from your homework.
• The name of your homework file should be ”surname_name.cpp”.
• You should use indentation and comments in your code.
• You should upload your homework file to the Moodle system until September 1, 2021
Wednesday 23.59 Late homeworks will NOT be graded.

Grading Schema:

Structure Definition: 5 pts


Function find_mvp: 20 pts
Main Program: 45 pts
Code Working Properly: 30 pts

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy