Program List
Program List
Write a program to perform all the arithmetic operation by taking inputs from command
5
line.
6 Write a program to perform the addition of n nos. by taking inputs from command line.
Write a program to perform the matrix addition & multiplication by allocation memory for
16
an array dynamically.
c. 40-49 pass
Write a program to read string from console and display the number of occurrence of each
19
word.
Assume that a bank maintains account for its customers; it may be saving or current. The
saving account provides compound interest and withdrawal facilities but not cheque book.
The current account provides cheque book but no interest. Current account holders should
also maintain a min balance & if the balance falls below, a service charge is imposed. Perform
the problem by using the switch cases. Include the necessary methods in order to achieve
the following tasks inside switch case:
e) Check for the minimum balance, impose penalty. If necessary, and update the balance.
21 Write a program to calculate the area of two different rectangle using class & objects.
Perform the Q. No. 21 by introducing methods for initializing the values and for calculating
22
the area.
24 Write a program to perform the Stack operations using class & objects.
25 Write a program to calculate the Volume of rectangle and cube using method overloading.
Input two one dimensional arrays A and B which are in ascending order. Write a program
31 to merge them into a single sorted array C that contains every item from array A and B in
ascending order.
Write a program to accept the shopping list of 5 items and stores them in a vector to
accomplish the following task.
Assume that the bank maintains two kinds of account. One called Saving Account and the
other is Current Account. The saving account provides compound interest and withdrawal
facility but no cheque book facility. The current account provides cheque book facility and
withdrawal facility but no interest. Current account holders should also maintains a
minimum balance and if the balance falls below this level, a service charge is imposed.
Create a class Account that stores customer name, account number, and the type of account.
33 From this derive the class curr_acct and sav_acct to make them more specific to their
requirement. Include the necessary methods in order to achieve the following task.
Assume that the publishing company markets print books and digital books. Create a class
named Publication with data members named title, price and authors name. from
Publication class derive two classes named Books and Ebooks. The Book class adds a page
35 count data member named pcount while Ebook adds data member playing time name
ptime. Each of the classes must have member functions getdata() to read class specific data
from keyboard and displaydata() to output the class specific data to the computer screen.
Write a Program to test these classes.
Assume that a shape interface contains the data members PI and functions area () and
36 perimeter (). Implement these two methods according to type of shape like circle, rectangle
and square classes.
SL. No. Title of the Program
Assume that binary interface contains the method: binary to decimal, decimal to binary,
37 two’s complement and binary addition. Create the appropriate classes to implement these
methods.
38 Write a program to display the use of all access modifiers with the help of two packages
Design a package to contain the class student and another package that contains the interface
39 sports. Write a program to display the Rollno, Paper1, Paper2 and total score of the
candidates.
42 Write a program to show the use of “throw”, “throws” and “finally” keyword.
43 Write a program to create a custom exception. Show its use with the help o java program.
Write a program to read two integer number and calculate the division of these two
44 numbers, throw an exception when wrong type of data is keyed in. and also maintain a try
block to detect and throw exception if condition “divide by zero” occurs.
Define an exception called “NoMatchException” that is thrown when a string is not equal
45
to “India”. Write a program that uses this exception.
46 Write a program to copy characters from one file into another using character streams
Write a program to create a sequential file that could store details of five students. Details
49 include id, name, class, semester, three subject marks. Compute and print students
information and their total marks.
Write a program to show reading and writing with random access file. At the same time
50
append some text to a file.
54 Write a program to draw various shapes (at least 5) using methods of graphics class.
57 Write a program to illustrate the use of multithreading. Also set priorities for threads.
Write a program that connects to a server by using a socket and sends a greeting, and then
58
waits for a response.
Write a program to create server application that uses the Socket class to listen for clients on
59
a port number specified by a command-line argument:
60 Write a program to show the use of methods of the ArrayList and LinkedList classes.
64 Write a program to read the file using text fields from program no 63.
Write a program to create a simple notepad in windows. Add more modules to the notepad
67
as per your intelligence.