0% found this document useful (0 votes)
20 views5 pages

Cc-202(1) Scientific Computinmg

Uploaded by

Khushi Shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views5 pages

Cc-202(1) Scientific Computinmg

Uploaded by

Khushi Shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

GUJARAT UNIVERSITY

BCA IV SYLLABUS

COURSE TITLE CORE JAVA PRACTICAL


COURSE CODE CC-214

COURSE CREDIT 3

Session Per Week 3


Total Teaching Hours 40 HOURS
AIM
To develop practical skill about the basic java programming language with OOP concepts.
To provide development skill of interface, exception handling, threading and applet.

LEARNING OUTCOMES
On the completion of the course practically students will:
1. Understand the java programming and Object Oriented Programing concepts.
2. Understand the concepts of Interface, Exception handling, Threading, and Package.
3. Understand the basic concepts of Applet.

DETAIL SYLLABUS
TEACHING
UNIT TOPIC / SUB TOPIC HOURS
1 Java Introduction 10
Write a program to evaluate simple interest of a given principle, rate and time.
1
A motor cycle dealer sells two-wheelers to his customer on loan, which is to be
repaid in 5 years. The dealer charges simple interest for the whole term on the
day of giving the loan itself. The total amount is then divided by 60(months) and
2
is collected as equated monthly instalment (EMI). Write a program to calculate
the EMI for a loan of Rs. X, where X is given from command line argument. Print
the EMI value in rupees.
A car accessories shop assigns code 1 to seat covers, 2 to steering wheel covers ,
3 to car lighting and 4 for air purifiers. All other items have code 5 or more.
While selling the goods, a sales tax of 2% to seat covers ,3% to steering wheel
3 covers, 4% to car lighting, 2.5% to air purifiers and 1.2% for all other items is
charged. A list containing the product code and price is given for making a bill.
Write a java program using switch statements to prepare a bill.

Write a java program to scan 3 integer values from the command line argument
4 and display the maximum number using conditional operator.

Write a program to calculate the hypotenuse of right angled triangle when other
5 sides
of the triangle are given. (Hypotenuse = square root (x*x + Y *Y))
Write a program to calculate the area of square and rectangle by overloading
6 the area method.

Create a complex number class. The class should have a constructor and
7 methods to add, subtract and multiply two complex numbers and to return the
real and imaginary parts.
A shop during festival season offers a discount 10% for purchase made up to
Rs.1,000,
12% for purchase value of Rs.1,000 or more up to Rs 1,500 and 15% for
purchase value
8 of Rs.1,500 or more. Write a program to implement the above scheme for a
given sales
and print out the sales and print out the sales value, discount and net amount
payable by
a customer. Create necessary methods and constructors.
A bank gives 6.5% per annum interest on deposits made in that bank. Write a
program to calculate the total amount that a person will receive after the end of
9 5 years for a deposit of Rs.5000 for compound interest. Create necessary
methods and constructors too.

Write a java program to display powers of 2 i.e. 2,4,8,16 etc up to 1024 using
10
bitwise operators.
2 Array, Inheritance and Interface 10
Write a program to sort the elements of one dimensional array. Read value of
1
array elements through command line argument.
Write a program to create an array to store 5 integer values. Also initialize the
2 array with 5 numbers and display the array Elements in reverse order.

3 Write a program to find sum of two matrices of 3 x3.


Write program to create an array of company name and another array of price
4 quoted by the company. Fetch the company name who has quoted the lowest
amount.
Write an interface called numbers, with a method in Process(int x, int y). Write a
class called Sum, in which the method Process finds the sum of two numbers
5 and returns an int value. Write another class called Average, in which the
Process method finds the average of the two numbers and returns an int.
Create a class called NumberData that accept any array of the five numbers.
Create a sub class called Numplay which provides methods for followings:
1. Display numbers entered.
2. Sum of the number.
3. Average of the numbers.
6 4. Maximum of the numbers.
5. Minimum of the numbers.
Create a class that provides menu for above methods. Give choice from the
command-line argument.

Declare an abstract class Vehicle with an abstract method named numWheels(


).provide subclasses Car and Truck that each implements this method. Create
7
instance of these subclasses and demonstrate the use of this method

Write an interface called Exam with a method Pass(int mark) that returns a
Boolean. Write another interface called Classify with a method Division(int
average) which returns a string. Write a class called Result which implements
8 both Exam and Classify. The pass method should return true if the marks is
great

Create class calculation with an abstract method area( ). Create Rectangle and
9 Triangle subclasses of calculation and find area of rectangle and triangle.

The abstract Vegetable class has four subclasses named cabbage, carrot and
potato. Write an application that demonstrates how to establish this class
hierarchy. Declare one instance variable of type string that indicates the color of
10
a vegetable. Create and display instances of these object. Override the toString()
method of object to return a string with the name of the vegetable and its color.

3 Package, String and Exception Handling 10


Create a package P and within that package create class PackClass which have
method called findmax( ) which find maximum value from three numbers. Now
1
import the package within another class DemoClass and now display the
maximum number.
Write a program that creates three different classes in three different packages
2 and access them from default package. All the three packages should be at the
same level.
Create package pack1 within this package create class A which contains one
instance variable and one instance method. Create another package pack2
3
within this package create class B. where class B is calling the method and
variable of class A
Write a program that accepts a string from command line and perform following
operations:
1. Display each character on separate line in reverse order.
4 2. Count total number of chracters and display each character's position too.
3. Identify that whether the string is palindrom or not.
4. Count total number of uppercase and lowercase characters in it.
Write a Java program to input n integer numbers and display lowest and second
5 lowest number. Also handle the different exceptions possible to be thrown
during execution.
Write a program that takes a string from the user and validate it. The string
6 should be at least 5 characters and should contain at least one digit. Display an
appropriate valid message.
Write an application that accepts marks of three different subject from user.
Marks should be between 0 to 100, if marks of any of the subject is not belong
to this range, generate custom exception out of RangeException. If marks of
7 each subjects are great

handling code to catch all the possible runtime exceptions likely to be generated
in the program.
Write a program which takes the age of 5 persons from command line and find
the average age of all persons. The program should handle exception if the
8
argument is not correctly formatted and custom exception if the age is not
between 1 to 100.
Write an application that converts between meters and feet. Its first command-
line argument is a number and second command line argument is either
"centimeter" or "meter". If the argument equals "centimeter" displays a string
reporting the equivalent number of meters. If this argument equals "meters",
9 display a string reporting the equivalent number of centimeter. If unit is not
given properly then generate custom exception Unitformatexception. If first
argument is not proper format then generate numberformatexception.
Generate other exception as per requirements. (1 meter=100 centimeter)
Write a program that accepts 5 even numbers from command line , if any of the
10 numbers is odd then throw custom exception OddException and count such
invalid numbers.
4 Multithreading and Applet 10
Write an application that starts two thread. First thread displays even numbers
in the range specified from the command line and second thread displays odd
numbers in the same range. Each thread waits for 300 milliseconds before
1 displaying the next numbers. The application waits for both the thread to finish

Write a program that create and starts five threads. Each thread is instantiated
from the same class. It executes a loop with ten iterations. Each iteration
2 displays the character 'x' and sleep for 500 milliseconds. The application waits
for all threads to

Write a java program to create 2 threads each thread calculates the sum and
average of 1 to 10 and 11 to 20 respectively. After all thread finish, main thread
3
runnable interface.

4
Create an applet which draws a line, rectangle and filled circle in applet display
5 area.

Write applets to draw the following shapes.


a. cone
6
b. cylinder
c. cube
Write an applet that take 2 numbers as parameter and display their average and
7
sum.
Write a Java applet that draws a circle centred in the centre of
8
the applet. The radius of the circle should be passed as a parameter.
9 Write an applet that draw a circle divided in 6 equal parts.

10 Write an applet that draw a rectangle divided in 5 equal parts.

TEXT BOOK/S:
Programming in Java
Oxford Publication
By Sachin Malhotra and Saurabh Choudhary

REFERENCE BOOKS:
1. Programming in Java 2
Jaico publishing house
By Dr. K. Somasundaram
2.The Complete Reference Java2
TMH Publication
By Herbert Schildt

WEB RESOURCES:
1. docs.oracle.com/javaee/6/tutorial/doc/girgm.html
2. docs.oracle.com/javaee/6/tutorial/doc/bnagi.htm
3.www.javatpoint.com
4.www.tutorialspoint.com
REQUIRED SOFTWARE/S
1. Any editor of Windows or Linux/UNIX.
2. JVM version 1.8

You might also like