060010503 – advanced java

17
060010503 – Advanced Java 2014 Ms. Anuja Vaidya Page 1 Practical No. 1 Enrollment No. Practical Problem Write a program to take input from user and ask the user to enter any character for which the user wants to calculate occurrences of it. Program should check whether the particular character presents in the given statement or not. If yes it should display the occurrences of it, otherwise proper message should be displayed. (Note: Use the functions of String class only.) Objective(s) To make aware of String class, StringTokenizer class, StringBuffer class and its functionality. Pre-requisite String class and its functions & StringTokenizer Duration for completion 1 Hour PEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solve industry problems. PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary for software development. CO(s) to be achieved CO1: Understand and use generic Collections and String objects. Solution must contain Program and Output Nature of submission Handwritten References for solving the problem Schildt, H., The Complete Reference : Java , Tata McGraw Hill Page no. 359-376 Post Laboratory questions 1. Is it possible to solve the above given program using StringBuffer? If yes, how it can be solved? Otherwise proper message should be displayed to the user. 2. How one can join three different strings without using + operator? 3. What changes should be made in the logic so that the same program generates the output for counting number of special characters is there in given input? 4. Which package is used in above program to take input from user using Scanner class? Assessment Solution achieves the desired objective(s) Viva Out of Marks 10 5 Secured by the student Signature Date

Upload: others

Post on 21-Feb-2022

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 1

Practical No. 1 Enrollment No.

Practical Problem Write a program to take input from user and ask the user to enter anycharacter for which the user wants to calculate occurrences of it. Programshould check whether the particular character presents in the givenstatement or not. If yes it should display the occurrences of it, otherwiseproper message should be displayed.(Note: Use the functions of String class only.)

Objective(s) To make aware of String class, StringTokenizer class, StringBuffer class andits functionality.Pre-requisite String class and its functions & StringTokenizerDuration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO1: Understand and use generic Collections and String objects.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage no. 359-376Post Laboratoryquestions

1. Is it possible to solve the above given program using StringBuffer?If yes, how it can be solved? Otherwise proper message should bedisplayed to the user.2. How one can join three different strings without using + operator?3. What changes should be made in the logic so that the same programgenerates the output for counting number of special characters isthere in given input?4. Which package is used in above program to take input from userusing Scanner class?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Page 2: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 2

Practical No. 2 Enrollment NoPractical Problem Using the Practical Problem 1 ask how many times user wants to check theoccurrences of the characters, according to that consider that character as akey and store it’s respective occurrences as a value in HashMap.Objective(s) To make aware of String class, StringTokenizer class, StringBuffer class andits functionality.Pre-requisite String class and its functions & StringTokenizerDuration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO1: Understand and use generic Collections and String objects.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage no. 359-376, 439,441-444, 464Post Laboratoryquestions

1. Using which other alternative the above given problem can besolved? Write down appropriate code segment.2. How one can compare two strings in Java?3. Which method of HashMap in above given problem used to retrieveone by one entry from Map?4. If a user forgets to import java.lang.* package, is there anypossibility of error to be raised? If yes, then specify an error.

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Page 3: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 3

Practical No. 3 Enrollment No.

Practical Problem Write a program that creates a user-define class called CustomerFeedbackcontaining members such as CutomerId, name, Feedback, type of product.Assume that five customers have given their feedback for the variousproducts. Prepare a list of customer feedback based on the type of theproduct.(Note: Use ArrayList to store different type of customer feedback.)

Objective(s) To make aware of collection and generics.Pre-requisite Class, object and collection framework.Duration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO1: Understand and use generic Collections and String objects.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage No: 439,441-444, 464Post Laboratoryquestions

1. What is the reason behind not solving the above given problemusing HashMap?2. Give two key differences between ArrayList and Set.3. What changes should be made in the logic so that the same programwill store only string type of data?4. Name the package necessary to import inorder to use collectioninterface in the above given problem.

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Page 4: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 4

Practical No. 4 Enrollment No.

Practical Problem Write a program to take full name as an input from user, the full name mustcontains First Name. Middle Name and Last Name. Using three threads printeach name at a time enclosed in square bracket.Example:Input: Riya Rajish ShethOutput: [Riya][Rajish][Sheth]Objective(s) To make aware of multithreading concept of JavaPre-requisite Thread class, Runnable interface and its method.Duration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO2: Develop multithreaded applications.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage no.232-235Post Laboratoryquestions

1. What can be the consequences with the above given problem isimplemented using Runnable interface instead of Thread class?2. For the above given problem, which function can be used to setname of thread?3. What changes should be made in the logic so that the same programwill print each name first than it will print square bracket?4. State the purpose of using method currentTimeMillies(). Does theuse of this method is compulsory in above program? If yes, thenspecify appropriate reason.

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Page 5: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 5

Practical No. 5 Enrollment No.

Practical Problem Write a program which accept book name from the user and display one byone character of that book name on every 3 seconds of interval.Objective(s) To make aware of multithreading concept of JavaPre-requisite Thread class, Runnable interface and it’s method.Duration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO1: Develop multithreaded applications.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage no.232-235, 236-238Post Laboratoryquestions

1. What could be the consequences with the above given problem ifwe use wait() method instead of sleep() method?2. Five threads are available in one program namely thread1, thread2,thread3, thread4 and thread5. User wants to execute thread5 firstamongst the 5 thread. How we can do this?3. What changes should be made in the logic so that the same programwill find the number of characters from two words simultaneously?4. Which method is used to free a resource allocated by thread?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Page 6: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 6

Practical No. 6 Enrollment No.

Practical Problem Write a Java program to create five threads with different priorities. Sendtwo threads of the highest priority to sleep state. Check the aliveness of thethreads and mark which thread is long lasting.Objective(s) To make aware of multithreading concept of JavaPre-requisite Thread class, Runnable interface and it’s method.Duration for completion 1.5 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO2: Develop multithreaded applications.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage No. 236-238Post Laboratoryquestions

1. When one need to use notify() instead of notifyAll()?2. In which scenario one will use concept of synchronization?3. What changes should be made in the logic so that the same programwill execute by implementing Runnable interface?4. Which are the two different ways for synchronization available?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Practical No. 7 Enrollment No.

Practical Problem Write a program to create a frame with yellow background and display themessage “Hello this is my first frame using applet”.Objective(s) To make aware of applet and event handling with applet and framesPre-requisite Applet class, event handling methods, event classes, listener

Page 7: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 7

Duration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO3: Use AWT objects and controls for developing GUI basedapplications.CO4: Understand delegation event model and use event listenersand classes for event handling.CO5: Develop applications using Swing controls.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage no. 637-695Post Laboratoryquestions

1. Give two points of differences between event listener and eventsource.2. Write down the steps to create a frame along with applet.3. What changes should be made in the logic so that the same programcloses a frame when user clicks on close button of window?4. Which packages are necessary to import in your program when youare creating a GUI based application?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Practical No. 8 Enrollment No.

Practical Problem Write a program to create a frame and draw shapes like round rectangle,circle, oval and line with blue border and fill with yellow color.Objective(s) To make aware of applet and event handling with applet and framesPre-requisite Applet class, event handling methods, event classes, listenerDuration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO3: Use AWT objects and controls for developing GUI based

Page 8: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 8

applications.CO4: Understand delegation event model and use event listenersand classes for event handling.CO5: Develop applications using Swing controls.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage no. 637-695Post Laboratoryquestions

1. When one need to use Graphics class instead of paint?2. Which type of care should be taken by developer while handlingevents generated by any component?3. What changes should be made in the logic so that the same programset the background color of window to green?4. Which method is used to fill a shape with pink color on canvas?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Practical No. 9 Enrollment No.

Practical Problem Write a program to create a frame which displays the following message.WelcomeToJavaNote: above three lines must be displayed in three different fonts.Objective(s) To make aware of applet and event handling with applet and framesPre-requisite Applet class, event handling methods, event classes, listenerDuration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO3: Use AWT objects and controls for developing GUI basedapplications.CO4: Understand delegation event model and use event listenersand classes for event handling.CO5: Develop applications using Swing controls.

Page 9: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 9

Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage no. 637-695Post Laboratoryquestions

1. List down necessary function names to retrieve font family nameand font face name?2. Is there any way to retrieve the list of fonts available in yoursystem in Java? If yes, write a function with prototype.3. What changes should be made in the logic so that the same programwrites data in the status bar of the window?4. Which method is used to check that whether font is bold or not?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Practical No. 10 Enrollment No.

Practical Problem Develop a frame which will have following picture in it.

Objective(s) To make aware of applet and event handling with applet and framesPre-requisite Usage of applet class, event handling methods, event classes, listenerDuration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO3: Use AWT objects and controls for developing GUI basedapplications.CO4: Understand delegation event model and use event listenersand classes for event handling.CO5: Develop applications using Swing controls.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage no. 637-695Post Laboratoryquestions

1. Give two points of differences between paint() and update()method.2. How one can draw a line with purple color on window?3. What changes should be made in the logic so that the same program

Page 10: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 10

draws a picture without color?4. To draw a pentagon on canvas, which method is used?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Practical No. 11 Enrollment No.

Practical Problem Write a program to create frame with two buttons and a message as shownbelow.When user clicks YES button or NO button the system displays either acongratulations message or a Regret message accordingly. Develop aprogram to display this message in the status bar of the window.

Objective(s) To make aware of applet and event handling with applet and framesPre-requisite Applet class, event handling methods, event classes, listenerDuration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO3: Use AWT objects and controls for developing GUI basedapplications.CO4: Understand delegation event model and use event listenersand classes for event handling.CO5: Develop applications using Swing controls.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage no. 637-695, 701-748Post Laboratoryquestions

1. Action Event and Adjustment event are generated by whichcomponent of AWT?2. When user clicks on button, it will display one message “ButtonClicked” in separate dialog box, write down the code to do thesame.3. What changes should be made in the logic so that the same programwrites a appropriate message to the status bar of the window?4. ItemStateChanged event is generated by which component of AWT?

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 10

draws a picture without color?4. To draw a pentagon on canvas, which method is used?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Practical No. 11 Enrollment No.

Practical Problem Write a program to create frame with two buttons and a message as shownbelow.When user clicks YES button or NO button the system displays either acongratulations message or a Regret message accordingly. Develop aprogram to display this message in the status bar of the window.

Objective(s) To make aware of applet and event handling with applet and framesPre-requisite Applet class, event handling methods, event classes, listenerDuration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO3: Use AWT objects and controls for developing GUI basedapplications.CO4: Understand delegation event model and use event listenersand classes for event handling.CO5: Develop applications using Swing controls.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage no. 637-695, 701-748Post Laboratoryquestions

1. Action Event and Adjustment event are generated by whichcomponent of AWT?2. When user clicks on button, it will display one message “ButtonClicked” in separate dialog box, write down the code to do thesame.3. What changes should be made in the logic so that the same programwrites a appropriate message to the status bar of the window?4. ItemStateChanged event is generated by which component of AWT?

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 10

draws a picture without color?4. To draw a pentagon on canvas, which method is used?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Practical No. 11 Enrollment No.

Practical Problem Write a program to create frame with two buttons and a message as shownbelow.When user clicks YES button or NO button the system displays either acongratulations message or a Regret message accordingly. Develop aprogram to display this message in the status bar of the window.

Objective(s) To make aware of applet and event handling with applet and framesPre-requisite Applet class, event handling methods, event classes, listenerDuration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO3: Use AWT objects and controls for developing GUI basedapplications.CO4: Understand delegation event model and use event listenersand classes for event handling.CO5: Develop applications using Swing controls.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage no. 637-695, 701-748Post Laboratoryquestions

1. Action Event and Adjustment event are generated by whichcomponent of AWT?2. When user clicks on button, it will display one message “ButtonClicked” in separate dialog box, write down the code to do thesame.3. What changes should be made in the logic so that the same programwrites a appropriate message to the status bar of the window?4. ItemStateChanged event is generated by which component of AWT?

Page 11: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 11

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the

student

Signature

Date

Practical No. 12 Enrollment No.

Practical Problem Write a program to create a window. When we press ‘M’ or ‘m’ key thewindow displays Good morning. When we press ‘A’ or ‘a’ key the windowdisplays Good Afternoon. When we press ‘E’ or ‘e’ key the window displaysGood Evening.Objective(s) To make aware of applet and event handling with applet and framesPre-requisite Applet class, event handling methods, event classes, listenerDuration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO3: Use AWT objects and controls for developing GUI basedapplications.CO4: Understand delegation event model and use event listenersand classes for event handling.CO5: Develop applications using Swing controls.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage no. 637-695, 701-748Post Laboratoryquestions

1. Give two points of differences between button and push buttoncontrol.2. How one can handle button text event?3. What changes should be made in the logic so that the same programdisplay “good night” when we press n?4. Which method we should override to handle text event?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Page 12: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 12

Signature

Date

Practical No. 13 Enrollment No.

Practical Problem Write a program to create a MenuBar and pulldown menus. The menubarcontains two options: Shape and Color. The Shape menu contains threemenu item polygon, round rectangle and rectangle within circle. The Colormenu contains three menu items purple, Sky Blue and orange. When userclicks on any of the shape from the shape menu, respective shape should bedrawn on the window and when user clicks on Color menu, respective colorshould be selected as a background color of a windowObjective(s) To make aware of applet, menu and event handling with applet and framesPre-requisite Applet class, event handling methods, event classes, listenerDuration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO3: Use AWT objects and controls for developing GUI basedapplications.CO4: Understand delegation event model and use event listenersand classes for event handling.CO5: Develop applications using Swing controls.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage no. 637-695, 701-748Post Laboratoryquestions

1. Give two points of differences between menu bar and menu item.2. How one can handle menu click event?3. What changes should be made in the logic so that the same programselect the color and draw the selected shape by that selected color?4. Which event should be handled when window is closing?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Page 13: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 13

Practical No. 14 Enrollment No.

Practical Problem Write a swing program to create a window with two text area. TheTextfields are called cut and paste respectively. There is a button called CUTAND PASTE. The user types a paragraph in the text area called cut, whenuser clicks on CUT button than the content of cut text area should be cutand paste into a paste text area when user click on PASTE button.Objective(s) To make aware of applet, menu and event handling with applet and framesPre-requisite Applet class, event handling methods, event classes, listenerDuration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO4: Use AWT objects and controls for developing GUI basedapplications.CO5: Understand delegation event model and use event listenersand classes for event handling.CO6: Develop applications using Swing controls.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage no. 637-695, 701-748Post Laboratoryquestions

1. Give two points of differences between applet and swing.2. How one can handle event in Swing?3. What changes should be made in the logic so that the same programdoes not allow paste button to be accessed by user before enteringdetail in text field?4. Which package should import to handle events generated by swingcontrols?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Practical No. 15 Enrollment No.

Practical Problem Write a program to create a frame with six different radio buttonsrepresenting your favorite six colors. When radio button is checked, thebackground must change to the corresponding color. (Note: use swingcontrols)

Page 14: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 14

Objective(s) To make aware of applet, menu and event handling with applet and framesPre-requisite Applet class, event handling methods, event classes, listenerDuration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO3: Use AWT objects and controls for developing GUI basedapplications.CO4: Understand delegation event model and use event listenersand classes for event handling.CO5: Develop applications using Swing controls.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage no. 637-695, 701-748Post Laboratoryquestions

1. Give two points of differences between model and view from MVC.2. How Swing components are lightweight?3. What changes should be made in the logic so that the same programdoes not allow selecting any of the radio buttons?4. Which class is used to create button in Swing?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Practical No. 16 Enrollment No.Practical Problem Write a program to create one URL (i.e http://www.ebay.com) and thenprint all the properties of that URL.Objective(s) To make aware of URL, networking concept, INetAddress, TCP/IP anddatagram protocol.Pre-requisite Usage of different class which is supported by Java for networking like URL,URLConnection, HttpURLConnection, INetAddress, TCP/IP Server Socket,Datagram packet.Duration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solve

Page 15: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 15

industry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO6: Develop basic connection-less and connection-oriented client-server applications.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage No. 601-615Post Laboratoryquestions

1. Give two points of differences between ipv4 and ipv62. How one can retrieve host name from URL?3. What changes should be made in the logic so that the same programopens a connection to ebay.com website securely?4. Which package we should import to implement concept ofnetworking in Java?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Practical No. 17 Enrollment No.

Practical Problem Write a program in which client will send one decimal number to serverand in response server will reply to the client by giving total number offraction point available in client request. (Note: Use ServerSocket class toimplement this program).Objective(s) To make aware of URL, networking concept, INetAddress, TCP/IP anddatagram protocol.Pre-requisite Usage of different class which is supported by Java for networking like URL,URLConnection, HttpURLConnection, INetAddress, TCP/IP Server Socket,Datagram packet.Duration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.

Page 16: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 16

PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO6: Develop basic connection-less and connection-oriented client-server applications.Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage No. 601-615Post Laboratoryquestions

1. Give two points of differences between TCP/IP and Datagramprotocol.2. How one can make server to listen to requests from client?3. What changes should be made in the logic so that the same programcan accept more than one request from more than one client?4. Which exception will get generated when one uses INetAddressclass?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date

Practical No. 18 Enrollment No.

Practical Problem Write a program in which client will send one statement to server and inresponse server will count the number of words and number of charactersavailable in that statement and reply to the client request. (Note: useDatagrams to implement this program.)Objective(s) To make aware of URL, networking concept, INetAddress, TCP/IP anddatagram protocol.Pre-requisite Usage of different class which is supported by Java for networking like URL,URLConnection, HttpURLConnection, INetAddress, TCP/IP Server Socket,Datagram packet.Duration for completion 1 HourPEO(s) to be achieved PEO2: To provide quality practical skill of tools and technologies to solveindustry problems.PO(s) to be achieved PO6: Ability to use the techniques, skills and modern tools as necessary forsoftware development.CO(s) to be achieved CO6: Develop basic connection-less and connection-oriented client-server applications.

Page 17: 060010503 – Advanced Java

060010503 – Advanced Java 2014

Ms. Anuja Vaidya Page 17

Solution must contain Program and OutputNature of submission HandwrittenReferences for solvingthe problem

Schildt, H., The Complete Reference : Java , Tata McGraw HillPage No. 601-615Post Laboratoryquestions

1. Give two points of differences between readUTF() and receive()method.2. How one can check that whether server is able to listen any requestfrom client or not?3. What changes should be made in the logic so that the same programcan count number of consonant from client’s request?4. Which exception will get generated when one uses URL class?

AssessmentSolution achieves the desired

objective(s)

Viva

Out of Marks 10 5

Secured by the student

Signature

Date