Write My Paper Button

WhatsApp Widget

. Create an abstract class ‘Bank’ with abstract methods ‘getBalance’ and ‘deposit’. ‘BankA’, ‘BankB’ and ‘BankC’’ are subclasses of class ‘Bank’, each having methods named ‘getBalance’ and ‘deposit’. 1000, 1500 and 2000 are deposited in banks A, B and C respectively using the ‘deposit’ method. Call the ‘getBalance’ method to print balance for the three classes. 2. Write a Java program to – Create an interface called Vehic

Course: CSE – 202

Task No: 3

1. Create an abstract class ‘Bank’ with abstract methods ‘getBalance’ and ‘deposit’. ‘BankA’, ‘BankB’ and ‘BankC’’ are subclasses of class ‘Bank’, each having methods named ‘getBalance’ and ‘deposit’. 1000, 1500 and 2000 are deposited in banks A, B and C respectively using the ‘deposit’ method. Call the ‘getBalance’ method to print balance for the three classes.

2. Write a Java program to –

  • Create an interface called Vehicle. In this interface create a method called printData()
  • Implement interface Vehicle by classes Car, SUV, Minivan
  • In each class write a method printString() and create a string which holds all data
  • In the method printData() in each class prints the data using printString() method.

Submission:

  • A lab report containing codes and screenshot of outputs. [File format: task_no_ID.pdf, example: task_3_20191234.pdf|
  • Don’t submit any zip file.

Penalty:

  • Plagiarism: If it can be proven beyond reasonable doubt that the assignment code(s) was plagiarized, the code will be invalid and no marks will be attributed.

CLAIM YOUR 30% OFF TODAY

X
Don`t copy text!
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
???? Hi, how can I help?