Question: Examine the lava code provided in the following the tasks. Create a separate Console application for Class Library i specified for each task and rewriteava

 Examine the lava code provided in the following the tasks. Create
a separate Console application for Class Library i specified for each task
and rewriteava code into C#following the logic of the examples. Use as
many specific features as possible. Submit your work to B8, so all
your source code and output can be seen in uw do your

Examine the lava code provided in the following the tasks. Create a separate Console application for Class Library i specified for each task and rewriteava code into C#following the logic of the examples. Use as many specific features as possible. Submit your work to B8, so all your source code and output can be seen in uw do your work either in Vie tudio arin Veludio code four choice! 1. Translate to the following Java code: Provide your source code and out in the form Berminated Repertum Apple Provided Integerat 2 and , the total is Provided Integers and the total is Provided Integer 1000 and 2000. the tal is Provided Integer 200 and 103, the total is 2. Translate to the following Jawa code: escom ago Provide your source code and put in the form terminated ReportSum plave Application Program File Enter the value for and press Enter Enter the value for be and press Enter: Provided Integers: s, the totalt terminated Reportiva Application Program Provided Integers! 2 and , the total is Provided Integers and the total is Provided Integers: 1000 and 2000, the total la Provided Integers 300 and 101. the total es20 K 3. Translate to C# the following code, move both methods into C# Class library App and call them from Console app. Library code provided 10 package uniti; import java.util.Scanner: public class Library public static void main(String args[]) { Scanners new Scanner(System.in); // Prompt the user to enter the number of Integer's System.out.println("What number of integers you will provide : "); int nunc.nextInt(); // Prompt the user to enter the first Integer Systen.out.println("Enter the value for and press Enter: "); int . sc.nextInt(); // Prompt the user to enter the second Integer System.out.println("Enter the value for 'b' and press Enter: "); int. Sc.nextInt(); if (nur - )) 1 Prompt the user to enter the third Integer System.out.println("Enter the value for 'e' and press Entert ) Int . sc.nextInt(); // Display the result System.out.printf("Provided Integers: x4d and Bad and Xed, the total is d ", a, b, sumo, be else // Display the result System.out.printf("Provided Integersi ad and Nad, the total is sd ", b, sum, b) > public static int som int nun, int num2)(1/2 parameters return nul + num2; public static int sun(int nunt, int nun, int nur>>[//3 parameters return nul nus2 num; 34 35 30 Submission: Submit both your source code and the output (both fully visible). Examine the Java code provided in the following three tasks. Create a separate Console application (or Class Library if specified) for each task and re-write Java code into C# following the logic of the examples. Use as many C# specific features as possible. Submit your work to BB, so all your source code and output can be seen in full. You can do your work either in Visual studio or in Visual studio code (your choice) 1. Translate to C# the following Java code: public class Reportsum 48 public static void main(String args[]) { //assume we have 2 numbers a and b,a - 2, b. 5 int a = 2; int b = 5; 8 System.out.println("Provided Integers: " +" and " + b + ", the total is " + (a+b)); 10 //assume we have 2 numbers a and b, a -4,5 - 4 a = 4; 12 b-4; 13 System.out.println("Provided Integers: " + + " and " + b + ", the total is + (a+b)); us // assume we have 2 numbers a and b, 1000, b - 2000 16 - 1000; 17 b-2000; 18 System.out.println("Provided Integers: " + = +" and " + b + ", the total is " + (a+b)); 19 20 1/assume we have 2 numbers and b, 100, b - 101 21 = 100; 22 b-1013 23 systen.out.println("Provided Integers: " + a + + b + ", the total is (a+b)); 24 25 ) Provide your source code and output in the form ReportSum (Java Application) C:\Program Files\Java\jdk Provided Integers: 2 and 5, the total is 7 Provided Integers: 4 and 4, the total is 8 Provided Integers: 1000 and 2000, the total is 3000 Provided Integers: 100 and 101, the total is 201 2. Translate to C# the following Java code: 4 8 9 11 1 package lessons; 2 3 import java.util.Scanner; 5 public class ReportSum3 { 69 public static void main(String args[]) { 7 Scanner sc = new Scanner(System.in); 1/ Prompt the user to enter the first integer 10 Systen.out.println("Enter the value for 's and press Enter: "); int a - sc.nextInt(); 12 // Prompt the user to enter the second integer System.out.println("Enter the value for 'b' and press Enter: "); 14 int b - sc.nextInt(); 15 16 1/Close the Scanner. It's a good practice to release the resource that was acquired 17 sc.close(); // Display the result 20 System.out.printf("Provided Integers: 540 and $4d, the total is X5d ", a, b, (a + b)); 21 ) 22 ) Provide your source code and output in the form 13 118 19 ReportSum3 [Java Application) C:\Program Files\Java\jdk Enter the value for 'a' and press Enter: 2 Enter the value for 'b' and press Enter: 5 Provided Integers: 2 and 5, the total is 7 ReportSum (Java Application) C:\Program Files\Java\jdk Provided Integers: 2 and 5, the total is 7 Provided Integers: 4 and 4, the total is 8 Provided Integers: 1000 and 2000, the total is 3000 Provided Integers: 100 and 101, the total is 201 3. Translate to C# the following code, move both methods into C# Class library App and call them from Console app. Library code provided 11 12 16 1 package uniti; 2 ; import java.util.Scanner; 5 public class Library public static void main(String args[]) { 7 Scanner se - new Scanner(System.in); 9 1/ Prompt the user to enter the number of integers 20 System.out.println("What number of integers you will provide: "); int nun - sc.nextInt(); // Prompt the user to enter the first integer 14 System.out.println("Enter the value for 'a' and press Enter: "); 1s int a - sc.nextInt(); // Prompt the user to enter the second integer 17 System.out.println("Enter the value for 'b' and press Enter: "); 18 int b - sc.nextInt(); 19 20 if (num - 3) 21 // Prompt the user to enter the third integer 22 System.out.println("Enter the value for 'c' and press Enter: "); 23 int - sc.nextInt(); 24 // Display the result 25 System.out.printf("Provided Integers: *Ad and nd and Xid, the total is X5d ", a, b, c, sum(a, b, c)); 26 27 else { 28 1/ Display the result 29 System.out.printf("Provided Integers: Xad and Xad, the total is XSd ", a, b, sum(a, b)); 30 B: > 32 public static int sum(int nunt, int num2) (1/2 parameters return nun + num2; } public static int sum(int numi, int num2, int num3)(1/3 parameters 36 return numl + num2 + nud; 37 38 ) 34 35e Submission: Submit both your source code and the output (both fully visible)

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!