Posts

Showing posts from September, 2020

COMPUTER GRAPHICS- Implement 2D Transformation : Translation, Scaling, Rotation, Reflection

Image
Experiment No.05 Aim: Implement 2D Transformation : Translation, Scaling, Rotation, Reflection and Shear. Prerequisite: 1. C Language. 2. Geometric Concepts. 2. Concept of 2D basic Transformations. Outcome: After successful completion of this experiment students will be able to, Apply the transformations and clipping algorithms on graphical objects.

COMPUTER GRAPHICS - Implement Scan line Polygon Fill Algorithm

Image
  Experiment No.04 Aim : Implement Scan line Polygon Fill Algorithm Prerequisite: C Language Outcome:  After successful completion of this experiment students will be able to Implement various output and filled area primitive algorithms  Theory: Basic Idea: The basic idea is to collect all of the edges (except horizontal edges) that compose the polygon, fill in the figure scan line by scan line using the edges as starting and stopping points. Main Components: To successfully fill in a polygon three main components will be used: Edge Buckets, an Edge Table and an Active List. These components will contain an edge’s information, hold all of the edges that compose the figure and maintain the current edges being used to fill in the polygon, respectively. Edge Buckets The edge bucket is a structure that holds information about the polygon’s edges. The edge bucket looks different pending on the implementation of the algorithm, in my case it looks like this: Edge Bucket representation Here

COMPUTER GRAPHICS - Implement Area Filling Algorithm: Boundary Fill, Flood Fill.

Image
 Experiment No.03 Aim:  Implement Area Filling Algorithm: Boundary Fill, Flood Fill. Prerequisite: C Language Outcome:  After successful completion of this experiment students will be able to Implement various output and filled area primitive algorithms Theory: Boundary Fill Algorithm The boundary fill algorithm works as its name. This algorithm picks a point inside an object and starts to fill until it hits the boundary of the object. The color of the boundary and the color that we fill should be different for this algorithm to work. In this algorithm, we assume that color of the boundary is same for the entire object. The boundary fill algorithm can be implemented by 4-connected pixels or 8-connected pixels. Flood Fill Algorithm Sometimes we want to fill in (or recolor) an area that is not defined within a single color boundary. Figure below shows an area bordered by several different color regions. We can paint such areas by replacing a specified interior color instead of searching

COMPUTER GRAPHICS - Bresenham’s Circle and Mid-point Circle Drawing Algorithm

Image
 Bresenham’s Circle Drawing Algorithm Step 1         Accept circle center and radius (100, 100) and radius 50 as input. Step 2 To set up initial parameters. x = 0, y = r ( y = 50 ), di = 3 - 2 * r ( di = -97). Step 3 Move the value of x from x = 0 to x = y by unit step. Step 4        Display circle pixels using eight way symmetry. ( Write 8 putpixel commands here ) Step 5         if (di <= 0) then select pixel at position ( xi + 1, yi ) di = di + 4 * xi + 6. else  Select pixel at position ( xi + 1, yi - 1)  di = di + 4 * xi - 4 * yi + 10. y = y - 1. Step 6         Repeat the procedure through Step 3. Step 7 End. Mid - point Circle Drawing Algorithm Step 1         Accept circle center and radius (100, 100) and radius 50 as input. Step 2 To set up initial parameters. x = 0, y = r ( y = 50 ), di = ( 5 / 4 ) - r ( di = - 49 ). Step 3 Move the value of x from x = 0 to x = y by unit step. Step 4        Display circle pixels using eight way symmetry. ( Write 8 putpixel commands here ) Ste

COMPUTER GRAPHICS - Implement DDA and Bresenham Line Drawing algorithms

Image
 Experiment No.01 Aim:  Implement DDA and Bresenham Line Drawing algorithms  Prerequisite: C Language Outcome:   After successful completion of this experiment students will be able to Implement various line, circle, ellipse drawing algorithms.

OOPM JAVA - Create applet to draw square with diagonal and circle enclosed in it

Image
EXPERIMENT NO: 16 Aim:  Write a program to create applet to draw square with diagonal and circle enclosed in it. Objective:  To create an applet (a small web application) for drawing the different graphical shapes by using applet and awt packages available in java.  Outcome:  Students implemented the java applet for creating a design pattern in terms of graphical shapes. Theory: Applet is a very special type of program that is embedded in a webpage for creating dynamic content. It runs in the browser and works at the client side. Advantage of Applet There are many advantages of applet. They are as follows: It works at client side so it takes less response time. Secured It can be compiled by browsers running under many platforms, such as Linux, Windows, Mac Os etc. Drawback of Applet Plugin is required at client browser to run the applet. The java.applet.Applet class gives 4 life cycle methods and java.awt.Component class gives 1 life cycle methods for an applet. java.applet.Applet clas

OOPM JAVA - Print table of any number using Synchronized method.

Image
Experiment No. 15 Aim: Write a program to print table of any number using Synchronized method. Objective: To make aware of multithreading concept and use of Synchronized method to avoid thread interference Outcome: Students implemented multithreading by using synchronized method.

OOPM JAVA - Create multiple threads to print $*$*$*$*$*$*.

Image
 Experiment No. 14  Aim: Write a program to create multiple threads to print $*$*$*$*$*$*. Objective: To make aware of multithreading concept and use of thread class for creating different threads of a program.  Outcome: Students implemented multithreading by inheriting the class Thread.

OOPM JAVA - Create your own exception

Image
 Experiment No. 13 Aim: Write a program to create your own exception. The exception will be thrown if number is odd. Objective: To make aware of runtime error handling using Exception class and use for real time situations.  Outcome: Students created own exception by inheriting the Exception class and successfully  implemented it.

OOPM JAVA - Create a abstract class Abstract Sum which has abstract methods sumofTwo() and sumofThree()

Image
 Experiment No. 12 Aim: Create a abstract class Abstract Sum which has abstract methods sumofTwo() and sumofThree().Create a class Sum which extends AbstractSum and implement it’s methods. Objective: To make aware of Abstract class and abstract methods concept.  Outcome: Students implemented Abstract class and abstract methods.

OOPM JAVA - Create an Interface ‘Vehicle’ which has abstract methods

Image
  Experiment No. 11 Aim: Create an Interface ‘Vehicle’ which has abstract methods changeGear(), speedUp(),applyBrakes().Create a classes like ‘Bike’ ,’Car’ which will implement functionality of ‘Vehicle’ in their own way  Objective: To make aware of Interface concept.  Outcome: Students implemented Interface and Inheritance.

OOPM JAVA - Create class Student (Roll No, name), class Test inherits Student class.

Image
  Experiment No. 10 Aim: Create class Student (Roll No, name), class Test(Marks1,Marks2) inherits Student class. Create class Result which extends Test and has a method named Calculate which finds total as (Total=Marks1+Marks2) and method which display all the details. Objective: To make aware of Inheritance and its types.  Outcome: Students implemented different types of Inheritance.

OOPM JAVA - Create a vector Student with their name.

Image
  Experiment No. 9 Aim: Create a vector Student with their name. Write a program to add, remove and display students name from vector. Objective: To make aware of dynamic growable arrays i. e. Vector class from util package in real world scenario.  Outcome: Students used vectors successfully for dynamic increase in size of array for real world problem.

OOPM JAVA - demonstrate all String and StringBuffer class methods

Image
Experiment No. 08 Aim : Write a program to demonstrate  all String and StringBuffer class methods Write a program to reverse a string and check it is palindrome or not. Objective: To make aware of specialized character string classes String and StringBuffer their use  Outcome: Students implemented different methods from String and StringBuffer class and their usage.

OOPM JAVA - program for matrix multiplication and transpose of a matrix.

Image
 Experiment No. 07 Aim: Write a program to perform matrix multiplication and transpose of a matrix. Objective: To make aware of two-dimensional array and its use  Outcome: Students implemented two-dimensional array. They are exposed to method of matrix multiplication and transpose. They learned to make use of nested loops

OOPM JAVA - Create user defined packages (parameterized constructor.)

Image
  Experiment No. 06 Aim: Write a Package MCA which has one class Student. Accept student detail through parameterized constructor. Write display () method to display details. Create a main class which will use package and calculate total marks and percentage. Objective : To create user defined packages and there use in real world. Outcome : Students created packages for various problems used in real world 

OOPM JAVA - Calculate the area of different shapes by using method overloading

Image
  Experiment No. 05 Aim: Write a program to calculate the area of different shapes (circle, triangle, rectangle, square) by using method overloading  Objective: To create a class with methods using different no of parameters and their overloading in real time scenario.  Outcome: Students successfully created and used method overloading as per requirement of the real time scenario 

OOPM JAVA - Create class that stores a string and all its status details

Image
 Experiment No. 04 Aim: Write a program to create class that stores a string and all its status details such as number of upper case characters, vowels, and so on Objective: To create a class and initialize them with different no of parameters by implementing constructors and their overloading in real time scenario.  Outcome: Students successfully created and initialized object as per requirement of the real time scenario.

OOPM JAVA - program to display pattern A A B 1 A B C 2 2 A B C D 3 3 3

Image
 Experiment No. 03 Aim: Write a program to display following patterns           A        A B 1     A B C 2 2  A B C D 3 3 3 Objective: To make use of different types of control statements and loops. Outcome: Students have used nested for loop to implement and solved above problem.

OOPM JAVA - Print the first Armstrong number starting from your roll no.

Image
Experiment No. 02 Aim: Write a program to check and print the first Armstrong number starting from your roll no. Take input from the command line arguments. Objective: To make the students aware of control structure and loops  Objective:  Students have used if-else and while loop to implement and solved above problem. Students are exposed to reading of input data from consol through command line.

OOPM JAVA - Use of Scanner class and BufferedReader class

Image
Experiment No. 01 Aim : Write a program to input your roll no, name, age, fees paid, gender from keyboard and print them.(Use of Scanner class and BufferedReader class) Objective : To make the students aware of different primitive data types and there use in real world . Outcome :  Students have come to know the different type of primitive data types of java. They have learned how to make use of these in real world scenario. Students are exposed to reading of input data from consol.