Question: I just need a Form1.cs code that consume the WCF service. public class NumberGuess { public int SecretNumber(int lower, int upper) { DateTime current Date

 I just need a Form1.cs code that consume the WCF service.

public class NumberGuess { public int SecretNumber(int lower, int upper) { DateTime

I just need a Form1.cs code that consume the WCF service.

public class NumberGuess { public int SecretNumber(int lower, int upper) { DateTime current Date = DateTime.Now; int seed = (int) currentDate. Ticks; Random random = new Random (seed); int Number = random. Next (lower, upper); return sNumber; } public string checkNumber(int userNum, int Secret Num) { if (userNum == Secret Num) return "correct"; else if (userNum > SecretNum) return "too big"; else return "too small"; 1. Based on the above given class, write a WCF .svc service with two operations on localhost of .Net IIS Express server. You may want to review Text Section 3.2 before completing this assignment. [10 points) 2. Create an ASP .Net Windows Forms Application to consume the .svc service in question 1. Visual Studio 2019 and 2017 project options are shown in Figure 1(a) and (b), respectively. (b) Choose Windows Forms App (Net Framework) template in Visual Studio 2017 Figure. Creating a Windows Forms App project in (a) VS 2019 and (b) VS 201 Then, you can use the Toolbox controls to create the GUI design, as shown in Figure 2 Page 3 of 10 A T Figure 2. Design View in Visual Studio 2019 The application GUI must contain at least the following items, as shown in Figure 3. You can add additional components in your design. [15 points WELCOME TO NUMBER GUESSING GAME Upper Lima Generate decret Number Play Attempts The number is Figure 3. Number Guessing Game Basic GUI Design The first two textboxes are used for a player to enter the lower and upper limits integers) of the random number to be generated The code behind the button "Generate a Secret Number" will generate a secret number and save it The last textbox allows the player to enter an integer to make a guess of the secret number A label (attempts) that displays how many attempts have been made after a secret number is A label (The number is) that displays if the given number is too small, too big, or a comect guess public class NumberGuess { public int SecretNumber(int lower, int upper) { DateTime current Date = DateTime.Now; int seed = (int) currentDate. Ticks; Random random = new Random (seed); int Number = random. Next (lower, upper); return sNumber; } public string checkNumber(int userNum, int Secret Num) { if (userNum == Secret Num) return "correct"; else if (userNum > SecretNum) return "too big"; else return "too small"; 1. Based on the above given class, write a WCF .svc service with two operations on localhost of .Net IIS Express server. You may want to review Text Section 3.2 before completing this assignment. [10 points) 2. Create an ASP .Net Windows Forms Application to consume the .svc service in question 1. Visual Studio 2019 and 2017 project options are shown in Figure 1(a) and (b), respectively. (b) Choose Windows Forms App (Net Framework) template in Visual Studio 2017 Figure. Creating a Windows Forms App project in (a) VS 2019 and (b) VS 201 Then, you can use the Toolbox controls to create the GUI design, as shown in Figure 2 Page 3 of 10 A T Figure 2. Design View in Visual Studio 2019 The application GUI must contain at least the following items, as shown in Figure 3. You can add additional components in your design. [15 points WELCOME TO NUMBER GUESSING GAME Upper Lima Generate decret Number Play Attempts The number is Figure 3. Number Guessing Game Basic GUI Design The first two textboxes are used for a player to enter the lower and upper limits integers) of the random number to be generated The code behind the button "Generate a Secret Number" will generate a secret number and save it The last textbox allows the player to enter an integer to make a guess of the secret number A label (attempts) that displays how many attempts have been made after a secret number is A label (The number is) that displays if the given number is too small, too big, or a comect guess

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!