Using the following program segment, identify the following using the best definition available: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text;
Using the following program segment, identify the following using the best definition available:
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 namespace ConsoleApplication1 6 { 7 class Program 8 { 9 static void Main(string[] args) 10 { 11 test t = new test(10); 12 Console.WriteLine(t.Geti()); 13 Console.WriteLine(t.J); 14 } 15 } 16 class test 17 { 18 private int i; 19 private int j; 20 public test(int a) 21 { 22 i = a; 23 j = a + 5; 24 } 25 public int Geti() 26 { 27 return i; 28 } 29 public int J 30 { 31 get 32 { 33 return j; 34 } 35 } 36 } 37 }
|
|
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started