Question: Using Visual Studio Create a console project. 1. Create an interface IMyInterface.cs - Add a method string iMessage() 2. Create a class named C1.cs -

Using Visual Studio 

Create a console project.

1. Create an interface "IMyInterface.cs" - Add a method "string iMessage()"

2. Create a class named "C1.cs" - Add 4 private data members, create property for each data member double loanAmnout=0.0; double years=0.0; double interests=0.0; double interestRate=0.0;

3. - Add a constructor with parameters to assign values to loanAmnout, years, interestRate with values that user entered.

4. - Add one method PayInterests() to return the interests interests = loanAmnout * interestRate * years

5. - Inheritate "IMyInterface", implement the method " iMessage()", return string "Be Ready!

6. In Program.cs, have users to enter loanAmnout, years, interestRate. - Call method PayInterests() to display total interests. - Call iMessage() to display "Be Ready!

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!