77 941
Assignments Done
Successfully Done
In August 2019

Answer to Question #15674 in C# for Zulekha

Question #15674
Create a console application with a class ‘Account’ having variables as id(int) and name (String).Add property ‘account-no’

which can be set andget. Add a ‘ReadOnly’ property ‘IntRate’ and ‘WriteOnly’ property‘Password’ for this class. Add a

shared property ‘Branch’ with set/get methods. In main method create objects of ‘Account’ and test these properties and

print the results on the screen.
Expert's answer
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
class Account
& int id;
& string name;
& private int no_account;
& public void setNoAcc(int a) { no_account = a; }

& private int IntRate;
& public int getIntRate() { return IntRate; }

& private int password;
& public void setPass(int p) { password = p; }

& int branch;
& public void setBranch(int b) { branch = b; }
& public int getBranch() { return branch; }

class Program
& static void Main(string[] args)
& {
Account ac = new Account();


& }

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions