Question

In: Computer Science

Using C# Create a class called CreditAccount. When user create this account, she/he need to enter...

Using C#

Create a class called CreditAccount. When user create this account, she/he need to enter sum of credit and loan repayment period in months. Monthly payment need to calculate using bank percentage. You must come up with a formula for calculating percentage, you can use any formula, you want.

Solutions

Expert Solution

using System;

  

public class CreditAccount {

      

    // Function to calculate monthly payment

    static float payment(float p,float r, float t)

    {

        float pay;

      

        r = r / (12 * 100); // one month interest

        t = t * 12; // one month period

        pay = (p * r * (float)Math.Pow(1 + r, t))

               / (float)(Math.Pow(1 + r, t) - 1);

      

        return (pay);

    }

  

    static public void Main ()

    {

        float principal, rate, time, emi;

        principal = ;

        rate = ;

        time = ;

          

        pay =payment(principal, rate, time);

          

        Console.WriteLine("Monthly Payment is = " + pay);

    }

}

using System;
  
public class CreditAccount {
      
    // Function to calculate monthly payment
    static float payment(float p,float r, float t)
    {
        float pay;
      
        r = r / (12 * 100); // one month interest
        t = t * 12; // one month period
        pay = (p * r * (float)Math.Pow(1 + r, t)) 
               / (float)(Math.Pow(1 + r, t) - 1);
      
        return (pay);
    }
  
    static public void Main ()
    {
        float principal, rate, time, emi;
        principal = ;
        rate = ;
        time = ;
          
        pay =payment(principal, rate, time);
          
        Console.WriteLine("Monthly Payment is = " + pay);
    }
}

Related Solutions

Use c# Create a program called ResortPrices that prompts the user to enter the number of...
Use c# Create a program called ResortPrices that prompts the user to enter the number of days for a resort stay. Then display the price per night and the total price. Nightly rates are R 500.00 for one or two nights, R 650.00 for three or four nights, R 850.00 for five, six or seven nights, and R 1500.00 for eight nights or more.
Create a C++ project called RobberyLanguage. Ask the user to enter a word. Write a function...
Create a C++ project called RobberyLanguage. Ask the user to enter a word. Write a function that will receive the word, use the word to compile a new word in Robbery language and return the new Robbery language word. In the function: Use a while loop and a newline character (‘\0’) to step through the characters in the original string. How to compile a word in Robbery language: Double each consonant and put the letter ‘o’ between the two consonants....
Create a console app c#. Using a List, ask the user to enter all of their...
Create a console app c#. Using a List, ask the user to enter all of their favorite things. Once they are done, randomly pick a value from the list and display it.
Needed in C++ In this assignment, you are asked to create a class called Account, which...
Needed in C++ In this assignment, you are asked to create a class called Account, which models a bank account. The requirement of the account class is as follows (1) It contains two data members: accountNumber and balance, which maintains the current account name and balance, respectively. (1) It contains three functions: functions credit() and debit(), which adds or subtracts the given amount from the balance, respectively. The debit() function shall print ”amount withdrawn exceeds the current balance!” if the...
C++ Memory Management: - Create a class called DynamicArray that allocates an integer array of user...
C++ Memory Management: - Create a class called DynamicArray that allocates an integer array of user defined size on the heap - Don't not use any of the STL containers (vector, list, etc) - Create the necessary constructors and destructor, code should allocate the array using new. - Write a method print_array that prints the array’s length and the contents of the array. - Create at least 2 DynamicArray objects and print their contents. Include your DynamicArray class below along...
(In C++) Bank Account Program Create an Account Class Create a Menu Class Create a main()...
(In C++) Bank Account Program Create an Account Class Create a Menu Class Create a main() function to coordinate the execution of the program. We will need methods: Method for Depositing values into the account. What type of method will it be? Method for Withdrawing values from the account. What type of method will it be? Method to output the balance of the account. What type of method will it be? Method that will output all deposits made to the...
In C# When the user enters an invalid value, ask the user to repeatedly enter the...
In C# When the user enters an invalid value, ask the user to repeatedly enter the value until a valid value has been entered. Gender must be ‘M’ or ‘F’. Residency must be ‘I’ or ‘O’. Existing Code: using System; public class Student {   public int credit;   public String firstname, lastname, gender, residency, edate;   public void input()   {     Console.WriteLine("\nWelcome to the Continental University Registration System!"); Console.WriteLine("\nEnter data about a student"); Console.Write("First Name: "); firstname = Console.ReadLine(); Console.Write("Last Name: "); lastname...
Create in C++ Prompt the user to enter a 3-letter abbreviation or a day of the...
Create in C++ Prompt the user to enter a 3-letter abbreviation or a day of the week and display the full name of the day of the week. Use an enumerated data type to solve this problem. Enumerate the days of the week in a data type. Start with Monday and end with Friday. Set all of the characters of the user input to lower case. Set an enumerated value based on the user input. Create a function that displays...
C# Create a console application that prompts the user to enter a regular expression, and then...
C# Create a console application that prompts the user to enter a regular expression, and then prompts the user to enter some input and compare the two for a match until the user presses Esc: The default regular expression checks for at least one digit. Enter a regular expression (or press ENTER to use the default): ^[a- z]+$ Enter some input: apples apples matches ^[a-z]+$? True Press ESC to end or any key to try again. Enter a regular expression...
Developer User Account Create a user account using T-SQL for developers named DEVELOPER with the password...
Developer User Account Create a user account using T-SQL for developers named DEVELOPER with the password TESTACCOUNT that grants the user the ability to: Select and modify any table. Connect to and have access to all resources. In SSMS
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT