CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
Ee java lab assignment 3
1. Kalyani Govt. Engg. College
EE/6th
Sem/OOP-LAB (EE-694(c))/Assignment - 3
Due Date:- 30-04-2013
Arrays and Strings
1. The final exam results of 10 students are tabulated as follows:
Name Roll e-mail Sub-1 Sub-2 Sub-3 Sub-4
123001
123002
…
123009
Write a program to read the data and determine the following:
a. Total marks obtained by each student.
b. Name and Roll of the students who obtained Maximum and Minimum total marks.
c. The highest marks in each subject and name & roll no. of that student.
2. Write a program to extract a portion of a character string and print the extracted string. Assume that m
characters are extracted, starting with the nth character.
3. Write a program that will read a text and count all occurrences of a particular word.
4. Create a flexible string (“Kalyani College”) using StringBuffer class. Print its length, each character and its
positions. Modify the string to “Kayani Govt. eng. College” and append the string “ is the best Engg. College.”
Modify “eng.” of the string to “Engg.”
Command Line Arguments and Input/Output
5. Write a program using Command Line Arguments which will take some(must be greater than 5) integer values as
input find the largest and smallest among them and also prints the number of arguments entered. The program
must prompt user if no arguments found or arguments less than 5.
6. Write a program using InputStreamReader and BufferdReader class that takes input: user-name, user-birth-year,
user-email. Prints “Hello ! <user-name>. You are <…>years old and your e-mail is: <abc@xyz.com>”.
7. Write a program using java.util.Scanner class to read Name, roll, marks obtained in 3 subjects(say Physics,
Chemistry and Maths) and Print those in the console.
Inheritance and Interfaces
8. Create the following using inheritance; make objects of each class, access members.
9. Make an abstract class shape having the following (int dim1,dim2; area()). Extend sub class Rectangle, triangle,
Square and override the area() method. Prepare objects and show their action.
10. Make an interface Area, implement Area in class Rectangle and in class Circle. Illustrate by making objects of the
class.