MTCA13104
MTCA13104
MCA Semester I
Subject Name: Object Oriented Programming with Java Subject Code: MTCA13104
Rationale: Object oriented concepts are a base for a lot of frameworks used in the industry.
Learning object oriented concepts will help understanding these frameworks. Learning these
concepts in Java is beneficial as it is widely accepted across the software industry.
Page 1 of 7
W.e.f. AY 2021-22
SARVAJANIK UNIVERSITY
Sarvajanik College of Engineering and Technology
Masters of Computer Applications
Content:
W.e.f. AY 2021-22
SARVAJANIK UNIVERSITY
Sarvajanik College of Engineering and Technology
Masters of Computer Applications
Note: This specification table shall be treated as a general guideline for students and teachers. The
actual distribution of marks in the question paper may vary slightly from above table.
Reference Books:
W.e.f. AY 2021-22
SARVAJANIK UNIVERSITY
Sarvajanik College of Engineering and Technology
Masters of Computer Applications
ISBN: 978-
0-13-
417730-4
4 Core Java Vol II – Cay S Horstmann Prentice 2017 10th Edition
Advanced Features Hall
ISBN: 978-
0-13-
417729-8
5 Programmer's Khalid A. Mughal Pearson 2017 1st Edition
Guide to Java SE 8 Rolf W. Rasmussen Education
Oracle Certified India
Associate (OCA) 978933257
9378
Course Outcomes:
PO PO PO PO PO PO PO PO PO PO PO PO PS PS PS
1 2 3 4 5 6 7 8 9 10 11 12 O1 O2 O3
CO-1 3 3 3 2 1 1 1 0 0 0 0 0
CO-2 3 3 3 2 2 1 1 0 2 0 1 1
CO-3 3 3 3 2 1 0 1 0 0 0 0 0
CO-4 3 3 3 2 1 0 1 0 0 0 0 0
CO-5 3 3 3 2 3 0 1 0 1 0 0 1
Page 4 of 7
W.e.f. AY 2021-22
SARVAJANIK UNIVERSITY
Sarvajanik College of Engineering and Technology
Masters of Computer Applications
CO-6 3 3 3 2 1 0 1 0 1 0 0 0
Rationa
le*
Rationale*: Explaining why it is matching this particular program outcome
● https://docs.oracle.com/en/java
● https://docs.oracle.com/en/java/javase/11/docs/api/index.html
● https://www.tutorialspoint.com/java/index.htm
● JDK 8 or higher
● Any Text Editor
List of Experiments:
W.e.f. AY 2021-22
SARVAJANIK UNIVERSITY
Sarvajanik College of Engineering and Technology
Masters of Computer Applications
marks as instance variables and count as static variable which stores the count of the
objects; constructors and display(). Implement constructors to initialize instance
variables. Also demonstrate constructor chaining.
Create objects of class “Student” and displays all values of objects.
7 Create a class “Rectangle” that would contain length and width as an instance variable
and count as a static variable.
Define constructors [constructor overloading (default, parameterized and copy)]
to initialize variables of objects. Define methods to find area and to display variables’
value of objects which are created.
[Note: define initializer block, static initializer block and the static variable and method.
Also demonstrate the sequence of execution of initializer block and static initialize
block]
8 Create a class “Vehicle” with instance variable vehicle_type. Inherit the class in a
class called “Car” with instance model_type, company name etc. display the information
of the vehicle by defining the display() in both super and sub class [ Method Overriding]
9 Create a class “Account” containing accountNo, and balance as an instance variable.
Derive the Account class into two classes named “Savings” and “Current”. The
“Savings” class should contain instance variable named interestRate, and the “Current”
class should contain instance variable called overdraftLimit. Define appropriate
methods for all the classes to enable functionalities to check balance, deposit, and
withdraw amount in Savings and Current account.
[Ensure that the Account class cannot be instantiated.]
10 Describe abstract class called Shape which has three subclasses say Triangle,
Rectangle, and Circle. Define one method area() in the abstract class and override
this area() in these three subclasses to calculate for specific object i.e. area() of
Triangle subclass should calculate area of triangle etc. Same for Rectangle and Circle
11 Define a class A in package apack. In class A, three variables are defined of access
modifiers protected, private and public. Define class B in package bpack which
extends A and write display method which accesses variables of class A.
Define class C in package cpack which has one method display() in that create one
object of class A and display its variables. Define class ProtectedDemo in package
dpack in which write main ()
method. Create objects of class B and C and class display method for both these objects.
12 Write a program in Java to demonstrate throw, throws, finally, multiple try block and
Multiple catch exception.
13 Write a small application in Java to develop Banking Application in which user
deposits the amount Rs 1000.00 and then start withdrawing of Rs 400.00, Rs 300.00
and it throws exception "Not Sufficient Fund" when user withdraws Rs. 500 thereafter.
14 Write a program to implement the concept of threading by extending “Thread” Class.
15 Write a program to implement the concept of threading by implementing “Runnable”
Page 6 of 7
W.e.f. AY 2021-22
SARVAJANIK UNIVERSITY
Sarvajanik College of Engineering and Technology
Masters of Computer Applications
Interface.
16 Write a program that executes two threads. One thread displays “Thread1” every 2,000
milliseconds, and the other displays “Thread2” every 4,000 milliseconds.
17 Write a program that creates and executes at least 2 threads. Each of the threads is trying
to deposit and withdraw money from the same Account object (Refer Program 9 above).
The threads should be synchronized such that the deposit and withdraw operations
should not be performed at the same time.
18 Write a Java program to create a Frame which includes Student name, Student Marks,
Out of Marks. Create a button to calculate percentage. Clicking the button should display
the percentage in another Percentage textfield which is disabled.
User should not be able to enter characters in the Marks textfield. Use KeyListener to
check.
Page 7 of 7
W.e.f. AY 2021-22