Click Here To Download
Monday, September 19, 2011
Theory Of Computing Book And 2 Leceture Sheet
Object Oriented Programming 2nd Class Part 2
CSE222: Object Oriented Programming Lab 2
Lab Objectives
To gain experience with
- the activity of programming
- Write some simple C++ program
- using cin object
- simple expressions
Type in the following program and run it.
1 #include <iostream.h>
2 using namespace std;
3 int main()
4 {
5 float number1,number2,sum,average;
6 cout << "Enter two numbers: "; //prompt
7 cin >> number1;
8 cin >> number2;
9 sum= number1+number2;
10 //average= sum/2;
11 cout << "Sum=" << sum<<"\n";
12 cout << "Average= " << (sum/2) <<"\n";
13 return 0;
14 }
2 using namespace std;
3 int main()
4 {
5 float number1,number2,sum,average;
6 cout << "Enter two numbers: "; //prompt
7 cin >> number1;
8 cin >> number2;
9 sum= number1+number2;
10 //average= sum/2;
11 cout << "Sum=" << sum<<"\n";
12 cout << "Average= " << (sum/2) <<"\n";
13 return 0;
14 }
In line number 7 and 8 we use two cin statements to get two integer numbers from key board. We can use both statement in one statement like cin >> number1 >>number2.
This statement will do the same thing. On line number 10 we make the statement into comments. On line number 12 we calculating and displaying average so we didn’t use the line number 10. Here we see how to print numeric data.
Now using the experience of this program do the following programs exercise? Your output should be attractive. This all program will use simple expressions only.
1. Write a program that converts Celsius to Fahrenheit. The formula is
F = 9/5C + 32.
2. Write a program to calculate the volume of a sphere,
Volume =4/3
r3
3. Write a program to print out the perimeter of a rectangle given its height and width.
Perimeter = 2 · (width + height)
4. Write a program that takes hours and minutes as input and outputs the total number of minutes (e.g., 1 hour 30 minutes = 90 minutes).
5. Write a program that takes an integer as the number of seconds and outputs the total hours and minutes and seconds (e.g., 3665 seconds = 1 hour 1 minute 5 seconds).
Object Oriented Programming 2nd Class
Object Oriented Programming 2nd Class
CSE222: Object Oriented Programming Lab 1
Lab Objectives
To gain experience with
● the activity of programming
● programming with cout object
● using your compiler
● recognizing syntax errors
1. The first exercise is to make sure you can type in, compile, link, and run a simple C++ program on your own C++ programming system, whatever that may be.
Type in the following program and run it.
#include <iostream.h>
int main (void)
{
cout << "G'day mate" << endl;
return (0);
}
This is a simple C++ program that uses iostream for output.
Now using the experience of this program do the following programs exercise:
1.Write a program to print your name, identification number, and date of birth. 1. Write a program that prints the message
My name is Hector, I am
a vector.
I am the subject of many a
physics lecture!
a. all on one line
b. on two lines
c. on eight lines
d. inside a box drawn with asterisks
2. Find the errors in the following program.
# include iore.h
mian(}
(
couts << \n"I like to write/n before I've read it.\n\n;
cout << "Then, with my pen, I always edit."\n;
Cout >> "But, with computer\s, now I type;
cout <<("An never, ever get it right./n")
}
3a. Indicate how many cout statements you would use to print out the following:
PART NO PRICE
T1267 $6.34
T1300 $8.92
T2401 $65.40
T4482 $36.99
b. What is the minimum number of cout statements that could be used to print out the table in 3a.
C. Write a complete C++ program to produce the output illustrated in exercise 3a.
1.5. What would be the output of the following program?
include <iostream.h>
int main()
{
cout << "The Hound of " << "t" << "h" << "e" << " ";
cout << "Baskervi" << "l" << "l" << "es\n";
cout << "by Arthur " << "C" << "onan Doyle\n";
return 0;
}
Thursday, September 15, 2011
First Class Of Math IV About Laplace Transform
What is Laplace transform?
The Laplace transform is an integral transform perhaps second only to the Fourier transform in its utility in solving physical problems. The Laplace transform is particularly useful in solving linear ordinary differential equations such as those arising in the analysis of electronic circuits.
The (unilateral) Laplace transform L (not to be confused with the Lie derivative, also commonly denoted L) is defined by
L_t[f(t)](s)=int_0^inftyf(t)e^(-st)dt,
Wednesday, September 14, 2011
Object Oriented Programming About 1st Class
Teacher said to all student in this class to learn more about C programming. In this course
Principles of object oriented Programming
Beginning With C++
Token Expression and control Structure
Funcions in C++
Class and object
Constructor and destructor
Operator overloading
Inheritance: Extending classes
Pointer, Virtual Funtions and Ploymorphism
First class teacher said about class
Difine Class
Start.....................................................................
Class Student
{
Private:
int id;
Char name[30];
Char grade[4];
Public:
void get Details();
};
End...............................................
Monday, September 12, 2011
Today is our first class
Today is our first class. Thank you sowrav to created this site. This is a very helpfull for all 13 batch student.
Wednesday, September 7, 2011
DIU 13 batch Class Fall Semester
Class will be started in 12/09/2011
DAY COURSE TEACHER ROOM
Sunday Theory of Computing MOI 601AB
Monday Object Oriented Programming MOI 505AB
Tuesday Object Oriented Programming Lab MOI L201
Wednesday Statistic RA 604AB
Thursday Mathematics-IV:Engineering DSA 601AB
ClassRoutine For Dept. of CSE Evening
DAY COURSE TEACHER ROOM
Sunday Theory of Computing MOI 601AB
Monday Object Oriented Programming MOI 505AB
Tuesday Object Oriented Programming Lab MOI L201
Wednesday Statistic RA 604AB
Thursday Mathematics-IV:Engineering DSA 601AB
Thank you every body. This is a blog for sharing every learning matarials.
Subscribe to:
Posts (Atom)