السلام عليكم ورحمة الله وبركاته
اخواني انا بحاجة ماسة للمساعدة وفي اسر ع وقت واذا كان بالامكان الرد علي الموضوع في هذه الليلة
انا ادرس بالغربة واحتاج من يساعدني في هذا المشروع
اللي يقدر يسوي يرد علي
ولكم مني جزيل الشكر والا متنان اخوكم القصاب
General
A competition consists of a group pf teams who compete against each other in a series of matches. For each team the organizers record the outcome of each of their matches, either win, lose or draw. The final competition score for a team is calculated by giving them 3 points for each match won, 1 point for each match drawn and no points for any match lost. You have been asked to write a simple prototype system that will record each team's performance and then display the name of the winning team with the highest final score.
Tasks:
(1) Implement and test each of the following auxiliary functions which are connected with the results for an individual team.
a. A function inputResult which allows the user to enter the result of a particular match for a team. The function should take the match number as a parameter and then allow the user to enter the result of that match. Ex. Either "win", "lose" or "draw". The function should ensure the user enters an acceptable value and then return that value to the function call
b. A function calcScore which given the number of wins and draws as parameters, returns the final competition points achieved.
c. A function displayResult which takes as parameters the team name and the number of wins, loses and draws the team achieved. The function should then display a nicely formatted alert window containing the following information: team name, number of wins, number of loses, number of draws, and final points scored.
(2) Implement a function teamScore which allows the results for a particular team to be recorded and their final point score calculates. The function should take the team name and the number of matches they have played as parameters. The function should then use the auxiliary functions from (1) above to allow the result of each match to be entered and a competition report to be produced for that team. The function should return the final point score that the team achieved in the competition.
(3) Finally, implement the main body of the program which should allow the user to enter the name and match results for each team in the competition, making use of the function teamScore defined above. It should record the name and score of the winning team and this information should be displayed after all match details have been entered. (Note: you may assume that a single team is always the outright winner)
الرجاء منكم الرد علي في اقرب وقت ممكن التسليم يوم الاربعاء
والله الموفق لكل خير
