Programming In Java (18cs41l)list Of Programs

  • Uploaded by: Mahesh Tr
  • 0
  • 0
  • February 2021
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Programming In Java (18cs41l)list Of Programs as PDF for free.

More details

  • Words: 1,017
  • Pages: 3
Loading documents preview...
18CS41L : Programming in Java Laboratory (0 : 0: 3) Course Type Semester CA Max Marks

: Core : IV : 100

Credits : 01 Contact Hrs/Week : 03

Course Objectives 1. To understand how to design, implement, test, debug, and document programs that use 2. 3.

basic data types and computation, simple I/O, conditional and control structures To understand the importance of Classes & objects along with constructors, Arrays. Discuss the principles of inheritance, interface and packages and demonstrate though problem analysis assignments how they relate to the design of methods, abstract classes and interfaces and packages.

4.

To understand importance of Multi-threading & different exception handling mechanisms.

5.

To learn experience of designing, implementing, testing, and debugging graphical user interfaces in Java using applet and AWT that respond to different user events and to retrieve database contents using JDBC connectivity

Course Outcomes CO1. To execute simple java programs to explore different looping constructs and to CO2. CO3. CO4. CO5. CO6.

work with arrays. To demonstrate the different types of constructors, Inheritance and to implement multiple inheritance. To analyze why java is a robust language using Exception handling mechanism To demonstrate the advantages of multithreading concepts through programming. To demonstrate the delegation model of event handling mechanism using Applets and Frames. To demonstrate the use the JDBC connectivity using MySQL/Oracle database

Course Outcomes – Program Outcome Mapping ( High=3, Medium=2, Low=3) PO1. PO2. PO3. PO4. PO5. PO6. PO7. PO8. PO9. PO10. PO11. PO12. CO1. 3 2 1 1 CO2. 3 2 1 1 CO3. 3 3 2 1 1 CO4. 3 2 1 1 1 CO5. 3 2 1 1 1 CO6. 3 2 1 1 1

PSO1. 2 2 2 2 2 2

PSO2. 1 1 1 1 1 1

Sl No 1 a b c

d e

2 a b c

d 3 a b

4

5

6

Program Name Programs on Selection and Iteration Statements Program to print Biggest of 3 Numbers if the numbers are not equal and also print whether the numbers are positive or negative or mixed numbers Program to print first 10 numbers in Fibonacci series Program to check a neon number (A neon number is a number where the sum of digits of square of the number is equal to the number. For example if the input number is 9, its square is 9*9 = 81 and sum of the digits is 9. i.e. 9 is a neon number) Program to find the input number is palindrome or not. Program to find the input number is a duck number or not using method ( A duck number contains zeros, but there should not be zero present in the beginning of the number. Eg., 3201, 1200) Arrays Program to search an element of the array using for each loop Program to sort an Array of elements in Ascending order Create a Java class to enter number of students and their total marks. Compute and print the deviation in marks of each student against the average of marks of the class. Program to demonstrate passing objects as parameters Constructors and Methods Demonstrate different types of constructors Create a Java Class “Shape” with constructor to initialize the one parameter “dimension”. Now create three sub classes of Shape with following methods (i) “Circle” with methods to calculate the area and circumference of the circle with dimension as radius. (ii) “Square” with methods to calculate the area and length of diagonal of the square with dimension as length of one side. (assuming length of each side of the square is same). (iii) “Sphere” with methods to calculate the volume and surface area of the sphere with dimension as radius of the sphere. Write appropriate main method to create object of each class and test every method.

c Demonstrate the different operations of Stack Inheritance and Interfaces a Program to demonstrate multi-level inheritance b Program to demonstrate multiple inheritance c Define an interface using JAVA that contains a method to calculate the perimeter of an object. Define two classes-circle and Rectangle with suitable fields and methods. Implement the interface “perimeter” in these classes. Write the appropriate main() method to create object of each class and test all the methods. Exception Handling a Design programs to demonstrate Exception handling mechanisms b Design a program to demonstrate user defined exception OPEN ENDED EXPERIMENT FOR TEST 1 this, super ,static, final key words a program to illustrate the keywords i) this ii) super (using inheritance) b program to illustrate the i) static block ii) static variable iii) static method iv) inner

7

static class v) final keywords Multithreading a Programs for creating multiple threads a) Using Thread class b) Runnable Interface b Create two threads in which one displays “Dept of CSE” for every 2 seconds and the other displays “ Jain University” for every 4 seconds continuously.

8

Applets and AWT a Design an Applet display the Sum of Two Numbers and set status message in Applet window b Draw Smiley in an Applet example. c Design an applet for Bouncing of a Ball

9

Event Handling in JAVA a Create a Frame with a button having caption PRESS ME, once the button is clicked, the caption changes to PRESSED. b Create an Applet with three text fields and a button. Input integer values in first two Text Fields. On Click of add button, the sum should be displayed in the third Text Field

10

c Create a swing applet that has two buttons named alpha and beta. When either of the buttons pressed, it should display “Alpha is pressed” or : Beta is pressed” JDBC Connectivity Demonstrate the use the JDBC connectivity using MySQL/Oracle OPEN ENDED EXPERIMENT FOR TEST 2

Assessment and Evaluation CA ( Continuous Assessment) : Every experiment is evaluated for100 marks Test1 : Conducted for 100 marks ( Open Ended Experiment ) in the middle of the semester Test1 : Conducted for 100 marks ( Open Ended Experiment ) towards end of the semester Semester End Test : conducted for 100 marks ( mini project demonstration) at the end of the semester

Related Documents


More Documents from "Yogesh2323"