Question: C# program Instance variable initialization Create a class ProblemSolution with following characteristics Two private member variables name & designation of string type. Parameterized constructor which

C# program

Instance variable initialization

Create a class ProblemSolution with following characteristics

Two private member variables name & designation of string type.

Parameterized constructor which takes 2 parameters to initialized name & designation.

Method solution with no input parameter and void return type. A method should print the member variable values in new lines.

Input John Snow

Warrior

where,

First line represents a name.

Second line represents a designation.

Output

John Snow Warrior

PLEASE FILL IN THE PARTIAL CODE BELOW

using System; using System.Collections.Generic; using System.Linq; public class ProblemSolution {

//write your code here

} class DriverMain {

public static void Main () { string name = Console.ReadLine (); string designation = Console.ReadLine (); ProblemSolution problemsolution = new ProblemSolution (name, designation); problemsolution.solution (); } }

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!