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!

Search & Filtering

There is a Change request from the customer. It is as follows:

You need to calculate Interest paid by banks on Saving Account.

Task 1 : Add a function declaration “void CalculateInterest()” in the interface. Define the functions in the concrete classes such as ICICI accounts get 7% interest and HSBC gives 5% interest.


Task 7: Create a console application. The Main() function needs to create the objects and execute thefunctionality as per the instructions.

Main( ) //Write this function

{

// Task to be performed:

Create a Object of ICICI Set the Account type to Saving (Use enum) Deposit Rs. 50000 to this account

Create another Object of ICICI Set the Account type to Current (use enum)

Deposit Rs. 20000 to this account

Print the Balance of both these account objects.

Now call the Transfer function to transfer the money from Savings account to Current Account.

The amount to be transferred is Rs. 5000.

e.g. a1.Transfer(a2,5000);

Now print the Balance after the Transfer from both the accounts.

Similarly, create two accounts of HSBC Bank. Transfer Rs. 30000 from Saving to Current and display thebalance.

}


Task 5: Implement only the Deposit method to increment the Balance. Keep the other two methods abstractin the class.

Task 6: Now let’s create concrete classes which are inherited from the BankAccount class.

Concrete Bank Account Classes having their own rules for Minimum Balance class ICICI // Inherit this from BankAccount

{

Withdraw() // Override this method

{

// If Balance – amount is >= 0 then only WithDraw is possible.

// Write the code to achieve the same.

}

Transfer() //Override this method

{

// If Balance – Withdraw is >= 1000 then only transfer can take place.

// Write the code to achieve the same.

}

}

class HSBC // Inherit this from BankAccount

{

Withdraw() //Override this method

{

// If Balance – amount is >= 5000 then only WithDraw is possible.

// Write the code to achieve the same.

}

Transfer() //Override this method

{

// If Balance – Withdraw is >= 5000 then only transfer can

take place.

// Write the code to achieve the same.

}

}


Let’s build a sample banking program to perform the common tasks like Withdraw and Deposit.

Task 1: Create a class library project and Add a Class called BankAccount. This class needs to implement the IBankAccount Interface.

Task 2: Define a enum as follows. This enum will be used as a property in the interface.

//public enum BankAccountTypeEnum

{

Current=1,Saving=2

}

Task 3: Define IBankAccount interface and add the following fields to it.

double GetBalance();

void Deposit(double amount);

bool Withdraw(double amount);

bool Transfer(IBankAccount toAccount, double amount);

BankAccountTypeEnum AccountType { get; set; }

Task 4: Create an abstract class called as BankAccount and implement the class with the interface

definedabove. Add a property called Balance in this class

protected double balance;


Create an abstract class shape in which area abstract function is there so two classes triangle and rectangle can override the functionality of area in shape class .Then a change of request has come as per new requirement a we have to find the area of square and area of circle also but they don’t want to override the functionality of abstract class shape but they want to implement their code?And area of circle is Pi r2 and area of square is (side)2.Q3) Write overloaded methods to find total salary of employees. Create a class Employee and write an overloaded method to find total salary of employee.Total salary=salary + Bonus+ incentives (data types use it decimal,int,int) Total salary=salary +HRA + PF (data types use it double,float,int)Total salary=salary + perks +travelling_allowences (data types use it is float,int,short)Create another subclass as EmployeeJunior and there also write one overloaded method and call al the methods as per the parameters passed in the main method in console application.


You have created Product class in Lab 1. You need to extend this class and create two derived classes from this class. The derived classes will be DurableProducts (eg: cars, furniture, computers) and NonDurableProducts(Food and Beverages)

The DurableProducts class will have VAT(value added tax) as an additional property. The NonDurableProducts will have ExpiryDate and Discount properties as additional properties.Task 1: Create these two classes by inheriting from the Product class.

Task 2: Override the GetTotalCost () Method in these two classes. For DurableProducts the new total cost will be (Cost + VAT)*Quantity. For NonDurableProducts the new total cost will be (Cost-Discount)*Quantity.Task 3: Create a console application to use these classes. Create a Menu driven application to select the Type of Product. Based on the user selection create the object and accept the details from the user.

Also display the total cost of the Product.


Create a quiz answer sheet checker. That does the following: 1. Posts questions – at least 5- then let the user input answers per question , it can be a multiple choice question, or solving question which will have a number for an answer. 2. After the user inputs their answer, let the program check the answer and display the score of the user.


Write a program to print all the elements of the single linked list in reverse order. The
algorithm should have linear time complexity and constant space complexity
Make a class to implement linked list and Implement the basic functions of Linked list .
 Constructors(default, parameterized, copy) & destructor
 void PrinList(),int search_Element(int X), bool Insert_Element(int X),
int
Insert_Element_at(int X, int pos), int Delete_Element(int X), void is_Empty(), int
Length(), void Print_Reverse_List(), bool Empty_List(),
 Also write a driver (main) program to test your code (provide menu for all operations )
LATEST TUTORIALS
APPROVED BY CLIENTS