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
Step: 1
Get Instant Access to Expert-Tailored Solutions
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