+ All Categories
Home > Software > Oops project newton second law of motion

Oops project newton second law of motion

Date post: 15-Feb-2017
Category:
Upload: khurshid-ahmad
View: 96 times
Download: 0 times
Share this document with a friend
15
Transcript
Page 1: Oops project newton second law of motion
Page 2: Oops project newton second law of motion

Oops project Newton Second law of motion

PROJECT PREPARE BYKhurshidSU-14-01-071-046

Page 3: Oops project newton second law of motion

Header file used and their Purpose IOSTREAM.H-input output stream header file 

CONIO.H - to stable the output display.

Page 4: Oops project newton second law of motion

Data typeThe data type we used in the program are float.

For example (float area etc.)

Page 5: Oops project newton second law of motion

Definition of classClass are the combination of

functions and variables.

Page 6: Oops project newton second law of motion

Working DescriptionThis Program is Designed for Newton second

law of motionThis Program consist of three options as

follows1. Create value of force2. Create value of horizontal distance3. Search moment of force

Page 7: Oops project newton second law of motion

FUNCTIONSThere are three functions used in this

program.1. Void get_data2. Void show_data 3. Void formula

Page 8: Oops project newton second law of motion

functionsVoid get_data:

Its purpose is to accept the data in which the user can enter.

Page 9: Oops project newton second law of motion

functionVoid show_data: Its shows the data in the outputFor Example (Cout<<“multiple”<<a*b;)

Page 10: Oops project newton second law of motion

functionsVoid formulaf=m*aF=forceM=massA=acceleration

Page 11: Oops project newton second law of motion

Program Code#include<iostream.h>#include<conio.h>Class force{ private: float f,m,a public:

void get_data()

Page 12: Oops project newton second law of motion

Cont….{ cout<<“enter the value of mass=“; cin>>m; cout<<“enter the value of acceleration=“; cin;} void formula(){ f=ma;}

Page 13: Oops project newton second law of motion

Void show_data (){ “Newton second law of motion F=“ cout<<“force=“;Cout<<i<<endl;}};Main()

Page 14: Oops project newton second law of motion

Cont…{ force l1,l2; l1.get_data();l1.formula();l1.show_data();l2.get_data();l2.formula();L2.show_data();getch();}

Page 15: Oops project newton second law of motion

Recommended