BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
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 examresultsof 10 studentsare tabulatedasfollows:
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 usingCommandLine Argumentswhichwill take some(mustbe greaterthan5) integervaluesas
inputfindthe largestandsmallestamongthemandalsoprintsthe number of arguments entered. The program
must prompt user if no arguments found or arguments less than 5.
6. Write a program usingInputStreamReaderandBufferdReaderclass thattakesinput: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 followingusing inheritance;make objectsof eachclass,accessmembers.
9. Make an abstract class shape havingthe following (intdim1,dim2; area()). Extend sub class Rectangle, triangle,
Square and override the area() method. Prepare objects and show their action.
10. Make an interface Area,implementAreainclassRectangle and inclass Circle.Illustrate bymakingobjectsof the
class.