Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

A football team has variable number of players, a name and a rating. A player has a name a, Summaries of Mathematics

A football team has variable number of players, a name and a rating. A player has a name and stats, which are the basis for his skill level. The stats a player has are endurance, sprint, dribble, passing and shooting. Each stat can be an integer in the range [0..100]. The overall skill level of a player is calculated as the average of his stats.

Typology: Summaries

2020/2021

Uploaded on 10/26/2022

hoang-nguyen-nhat
hoang-nguyen-nhat 🇨🇳

7 documents

1 / 6

Toggle sidebar

Related documents


Partial preview of the text

Download A football team has variable number of players, a name and a rating. A player has a name a and more Summaries Mathematics in PDF only on Docsity! Exercise 1: internal class Pe Z n <Person> { public string name; public int age; Pll ee Set ee eM eae DB i this.name = name; this.age = age; y public Person() : this( fi d Pree ts Person(int age) : this( i - int CompareTo(Person other) (Chats LA aot hee a ee Ue Ta U2 Person class Exercise 2: static void ee See eR Premera ee Seed eet bool swapped = false; pare ace Der ee ee cers CeReateccelo assess we swapped = true; } Bestar paar ests n basePerson = (Person)enptyCtor.Invoke(new object] { }); n personilithlge = (Person)ageCtor.Invoke(nex object(] { age }); Cec ee id ene ress -tE] { age, name }) : (Person)namefigeCtor. In Pees eer A Ua et Oe FRU ee eee Exercise 3: ee eer ae { List<Person> families; public Family() { families = new List<Person>(); Pe Bem B Rees) Toa Gs Tuto) { pea sl Crt ee public Person Get i Stat ae eee ee) La Bia e aio for (int i = i < families.Count; i++) { Poa Fae t Ieee eae 8) { max = families[i].age; maxIndex = i; } a Seam G Et ealel-ba ) return families[maxIndex]; ) RT bt-s ls Family class reer) Peon Preece eto reese eres coy Perea erence) Piece scorer Bestest essen tas ees a ec Tt Reta tT) Peers Comeeeertstor Peeeeer eee er enail = email. reer Ce Rr aCe Cope ese eC esesu oe eee ay ‘this(nane, salary, position, department, enail, Pigeon ee ee See ee eure ee eae) this(name, salary, position, department, age) cs public override string TeString() rs Pee onas ea 3 Employee class apeecs ones eens errs il Peco ene Gores pence oC ack eet ons et TC emet oe Oey easter led Seas Ponaee eect tert en Meco came UCC Er meC TCS] Ret eee) pore es etry DE Peer reee Te a ene es PECs ey RLS Reo Breer tren oe} ee eer Cee oe) eee ae reo eR eat sending(g => g.salary) eerie er icr rurTen) 4 Ce eee ea ees)
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved