Experiment-4
Experiment 4
To perform event handling and GUI programming
Program 1
Aim:Write a program to find the Area of a circle through default
constructor, parameterized constructor and by modifyi
Chapter 4.2 Counting
Read: 4.2
Next Class: 4.3
Motivation
1
Section 3.2
We have already seen that different sets can have different
numbers of elements. Even infinite sets can have different
complexit
Chapter 4.1 Sets
Read: 4.1
Next Class: 4.2
Set theory
1
Section 3.1
Sets: Powerful tool in computer science to solve real world
problems.
A set is a collection of distinct objects called elements.
Tra
Chapter 4.3 Principles of Inclusion
and Exclusion
Read: 4.3
Next Class: 4.4
Principle of Inclusion & Exclusion
1
If A and B are subsets of universal set S, then (A-B), (B-A) and
(A B) are disjoint set
Permutation and Combinations
Read: 4.4
Next Class: 4.6
Motivations
1
Section 3.4
Different counting principles (multiplication and addition)
provide a basis to calculate the number of possible outcome
Probability
Read: 4.6
Next Class: 5.1
Introduction to Finite Probability
1
If some action can produce Y different outcomes and X of those
Y outcomes are of special interest, we may want to know how
li
5.1 Relations
Read: 5.1
Next Class: 5.2
Motivation
1
Section 4.1
Given different sets, it is important to be able to
manipulate different elements and to be able to relate them
to each other.
Operatio
Topological Sorting
Reading: 5.2
Next Class: 5.4
Example: Topological Sorting
1
Ernie and his brothers run a woodworking shop in the hills of
New Hampshire that manufactures rocking chairs with padded
Chapter 5.4 Functions
Reading: 5.4
Next Class: 5.5
Motivation
1
Section 4.4
Different types of relations allow different techniques to be
applied efciently.
Partial orderings permit to represent any o
Chapter 5.4 & 5.5 Functions (contd)
Reading: 5.5
Next Class: 5.7
Motivations
1
Section 4.4
Functions can be used to characterize important aspects of
problems.
A number of problems can be recast as pr
OBJECT ORIENTED PROGRAMMING WITH JAVA
EXPRIMENT - 3(1)
AIM: Write a program to check an object is an instance a
particular class or not.
import java.io.*;
class Parent
cfw_
public Parent()
cfw_
clas
Advance Processor (150701)
Experiment No: 3
Aim: Write a program to perform Addition, Subtraction and Multiplication for
two BCD numbers
ADDITION
Program:
Instructions
Status
Comments
MOV AL,08H
AL=08
Lab 2:
Requirements:
Compiles without warnings on omega using gcc and setting the std option to c89
o gcc std=c89 pedantic g filename.c
Create a class Roster that contains information for 7 Students
E
AdvancedProcessor(150701)
Experiment No: 9
Aim: WAP to transfer block of String from one location to another
Transfer Block Of String
Program:
Instructions
Status
.MODEL SMALL
.DATA
Str db WELCOME
Des
Advance Processor (150701)
Experiment No:- 9
Aim: Write a program to transfer a block of string from one location to
another.
INSTRUCTIONS
STATUS
COMMENTS
TRANSFER BLOCK OF STRING
.Model small
Small t
Experiment-2
Experiment 2
To perform Objects and Classes programs
Program 1
Aim: Write a program to find the Area of a circle through default
constructor, parameterized constructor and by modifying th
Advance Processor (150701)
EXPRIMENT - 7
AIM: Write a program to find largest number from given array.
INSTRUCTIONS
STATUS
COMMENTS
LARGEST FROM GIVEN ARRAY
.Model small
.Data
arr db 10h,13h,7h,2h,15h
Advance Processor (150701)
INSTRUCTIONS
STATUS
COMMENTS
ADDITION OF TWO 32b NUMBERS
.Model small
.Data
Data segment start.
a dd 1234f678H;
a=1234f678H
b dd 03451111H;
b=03451111H
ans dd ?;
ans = ?
.Co
Advance Processor (150701)
Experiment No:- 8
Aim: Write a program to sort n numbers in ascending order.
INSTRUCTIONS
STATUS
COMMENTS
SORT N NUMBER IN ASCENDING
.Model small
.Data
Arr db10h,30h,20h,40h
Experiment 1
To perform Java basic programs
Program 1
Aim: Program to print Hello Java
Code:
import java.*;
public class H
cfw_
public static void main(String args[])
cfw_
System.out.println("Hello Ja
Chapter 5.7 Matrices
Read: 5.7
Next Class: 6.1
Motivations
1
Section 4.6
Arrays are very common data structures to store sorted
data in an efficient way which allows easy access to
individual elements