The document outlines an assignment consisting of two lessons. Lesson 1 involves inputting an integer to print odd composite numbers, count specific natural numbers, display prime number developments, and count students with the surname 'Van'. Lesson 2 focuses on managing a football team player class with functionalities for inputting, displaying, updating player information, calculating striker salaries, and sorting players by shirt number.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
2 views
Assignment1 C# Language&OOP Test1
The document outlines an assignment consisting of two lessons. Lesson 1 involves inputting an integer to print odd composite numbers, count specific natural numbers, display prime number developments, and count students with the surname 'Van'. Lesson 2 focuses on managing a football team player class with functionalities for inputting, displaying, updating player information, calculating striker salaries, and sorting players by shirt number.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
ASSIGNMENT 1
Lesson 1 : Input an integer number from keyboard (named n) and
- Print to the screen odd composite numbers < n. (Composite number is natural numbers greater than 1 and must be divisible by a number > 1 and itself.) - In the natural numbers <= n count how many numbers there are: + Divide by 5. + The end digit is “5”. - Print out the successful development of prime numbers from small to large. Example: 9 --> 3.3 12 --> 2.2.3 - Give a students list with the fullname of students. Count how many students that surname is "Van".
Lesson 2: We need to manage the player in a football team.
- Player: with the informations: code, name, shirt number , position, salary. 1. Build the class as the above requirement (using the inheritance). 2. Build an interface, named IManger to design some methods: - Input a list of players. - Show list of players. - Update the information of players void changePlayer(int playercode, int option, int shirtnumber, double salary); + If option = 0, change the shirt number of player + If option !=0, change the salary. - Sum of the salary of the players that are the striker. - Sort the list of players by ascending shirt number. 3. Implement the above interface. 4. Build the main class: - Show the menu. - Depending on the option, call the processing functions in section 3 to display the results.