Q1. If there is a class named Account as follows: Public class…
Question Answered step-by-step Q1. If there is a class named Account as follows: Public class… Q1. If there is a class named Account as follows:Public class Account [ Public Account(int accountId)[AccountId = accountId;]Public String Account [get;set;]Public String Name [get;set;]Public Int Balance [get;set;] ] Which of the following is/are correct syntax for instantiation of object? Multiple answers can be correct. Var acc = new Account(123)Account acc = new Account()Account account = new Account(345)Account = new Account(23) Q2. If a required library is not included in a program what will happen? For example writing Console.WriteLine(“”); in the program without adding a namespace or library.No error will occur and program will run fineA compile time error will occurProgram will run with unreliable results Q3. For the following class: Public class Account [Public String AccountID { get; set; }Public String Name { get; set; }Public int Balance { get; set}] The following statements will compile fine: Var account = new Account()Account Balance = 22; TrueFale Q4. Please select the correct output of the following code: Int val1 = 20;Int val2 = 44;If((val1 >= 20) && (val2 <= 44))[ Console.Write("Condition 1 met");] Val2 = 0;If(val2 > 0 || val1 < 21)[Console.Write("condition 2 met");] Condition 1 metCondition 2 metCondition 1 met, Condition 2 met Q5. Please select the correct output of the following code: Int val1 = 20;Int val2 = 44;If((val1 >= 20) && (val2 <= 44))[ Console.Write("Condition 1 met");] Val2 = 0;If(val2 > 0 || val1 < 21)[Console.Write("condition 2 met");]Else [ Console.Write("Hello there");] Condition 1 metCondition 2 metCondition 1 met, condition 2 metCondition 1 metcondition 2 met Q6. Please select correct output of the code: Bool val1 = false;Bool val2 = true; If(val 1)[ Console.Write("Value 1");]Else[ Console.Write(""Value 2);] Value 2Value 1Value 1, Value 2Null Computer Science Engineering & Technology Object-Oriented Programming COMP SCI 108 Share QuestionEmailCopy link Comments (0)


