B Tech Notes
B Tech Notes
1. Write a generic class for Vector arithme c (only addi on) using Object[] as a data member.
Decide methods for par al implementa on of GenericVector class and provide the
implementa on of abstract methods in IntegerVector class. Also write a test class to test
vector addi on.
2. Write a console based program to fulfill the given requirements. The program takes the
name of student from the user. The name is supplied as a single string containing first name,
middle name, and surname, where each name part is separated by one or more white
spaces. Display each part (first name, middle name, and surname) on a separate line.
3. Apply concepts of generic class to implement matrix addi on opera on for matrix of type
Double. Write appropriate abstract class, abstract methods, and concrete class for Double
matrix. Design your solu on generalized so that the user can pass the size of two matrices
and elements of both the matrices through keyboard input and the applica on displays the
result of addi on of two matrices.
4. Write a program that stores short-forms and full-forms of degrees (example, BTech for
Bachelor of Technology, MTech for Master of Technology, …, etc ) in two arrays. The user
passes short-form of any degree at command line argument. The program searches that
short form in the first array and finds out corresponding full-form from the second array and
then displays both the short-form and the full-form on the console. If the short-form is not
found in the array, the program displays the message “No such entry”.
5. Apply the concepts of Java network programming and write a server applica on for the
following client-server applica on. A student (client) requests the server for ge ng
a endance record by providing his/her roll number, e.g., 108, and the server program
responds back with the a endance percentage in the given format, e.g., Roll Number 108,
a endance percentage is 85.5%. The server stores the a endance percentage for each
student in an array a endancePercentage, which you need to ini alize with random values
from 0 to 100.0. Write only server applica on (StudentA endanceServer) running on port
8080 and the server should handle mul ple clients simultaneously using mul -threading
concept.
6. Create a console based Java applica on that sa sfies the given requirements: the applica on
accepts N number of integer numbers as command line arguments and does sum of all those
numbers. However, for any nega ve number, the applica on throws user-defined/custom
excep on called Nega veNumberExcep on containing appropriate message and does not
add it to the total and con nue processing with the next element. Also show sample
input/output for one test case covering the specified requirements.