Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C# Visual studio use the logiclayer, datalayer, presentation Question 2 Background Recall from LU2 that a Multi-tier Architecture is a software architecture in which different

image text in transcribed

C# Visual studio use the logiclayer, datalayer, presentation

Question 2 Background Recall from LU2 that a Multi-tier Architecture is a software architecture in which different software components, organised in tiers (layers), provide dedicated functionality. The most common occurrence of a multi-tier architecture is a 3-tier system consisting of: the presentation layer, the business logic layer as well as the data layer. Keep this mind as you engage through this exercise. The Problem Statement Develop a console C# application that simulated a soccer match. The application must randomly generate the goals scored by the home team and the away team. Based on the goals scored a winner must be determined. The results of the game must be store in "EPL.txt" as shown in Figure 1. File Edit View Chelsea Vs Man Utd 2 Man City Vs Liverpool 4 4 Watford Vs Asernal 3 1 Figure 1: Data written to a file . The Data Layer: must write to the file the outcome of that match as shown in Figure 1, including the names of the team and below is the scores of that particular match. The Business Layer: Create a class called Teams. The class must have 2 data member name of the team and number of goals score. The class must also have a method that randomly generates the goals scored. Include properties or setter and getters. Create another class called Match. This class has 2 data member of type team as shown in Fig 2. The class must also have to play the match (basically invoking the method that generate random number from the Team class). Include another method that displays the results of the outcome of the match on the screen as shown in Figure 3. A method that invokes the data layer method that write to the file. public class clsMatch { private clsTeam home = new clsTeam(); private clsTeam away = new clsTeam(); 4/5 Figure 2 file:///C:/Users/Sandi/Documents/Office/2022/DSW03A1/Test/Sem Test 1/Sem Test 1 Q2 Solution/Sem Test 1 Q2 Solution/bi Man City draw with Liverpool Figure 3: Results of a single match . The Presentation Layer: Create objects of the Team and one of Match. Play the match by invoke the methods that generate goals scored Display the results on the screen and shown in Figure 3. Write the information to a file as shown in Figure 1. . . Question 2 Background Recall from LU2 that a Multi-tier Architecture is a software architecture in which different software components, organised in tiers (layers), provide dedicated functionality. The most common occurrence of a multi-tier architecture is a 3-tier system consisting of: the presentation layer, the business logic layer as well as the data layer. Keep this mind as you engage through this exercise. The Problem Statement Develop a console C# application that simulated a soccer match. The application must randomly generate the goals scored by the home team and the away team. Based on the goals scored a winner must be determined. The results of the game must be store in "EPL.txt" as shown in Figure 1. File Edit View Chelsea Vs Man Utd 2 Man City Vs Liverpool 4 4 Watford Vs Asernal 3 1 Figure 1: Data written to a file . The Data Layer: must write to the file the outcome of that match as shown in Figure 1, including the names of the team and below is the scores of that particular match. The Business Layer: Create a class called Teams. The class must have 2 data member name of the team and number of goals score. The class must also have a method that randomly generates the goals scored. Include properties or setter and getters. Create another class called Match. This class has 2 data member of type team as shown in Fig 2. The class must also have to play the match (basically invoking the method that generate random number from the Team class). Include another method that displays the results of the outcome of the match on the screen as shown in Figure 3. A method that invokes the data layer method that write to the file. public class clsMatch { private clsTeam home = new clsTeam(); private clsTeam away = new clsTeam(); 4/5 Figure 2 file:///C:/Users/Sandi/Documents/Office/2022/DSW03A1/Test/Sem Test 1/Sem Test 1 Q2 Solution/Sem Test 1 Q2 Solution/bi Man City draw with Liverpool Figure 3: Results of a single match . The Presentation Layer: Create objects of the Team and one of Match. Play the match by invoke the methods that generate goals scored Display the results on the screen and shown in Figure 3. Write the information to a file as shown in Figure 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Finance questions

Question

Explain why ethics is a factor in crisis communication.

Answered: 1 week ago