oops project newton second law of motion
TRANSCRIPT
![Page 1: Oops project newton second law of motion](https://reader034.vdocuments.us/reader034/viewer/2022042706/58a357791a28ab14598b59f1/html5/thumbnails/1.jpg)
![Page 2: Oops project newton second law of motion](https://reader034.vdocuments.us/reader034/viewer/2022042706/58a357791a28ab14598b59f1/html5/thumbnails/2.jpg)
Oops project Newton Second law of motion
PROJECT PREPARE BYKhurshidSU-14-01-071-046
![Page 3: Oops project newton second law of motion](https://reader034.vdocuments.us/reader034/viewer/2022042706/58a357791a28ab14598b59f1/html5/thumbnails/3.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042706/58a357791a28ab14598b59f1/html5/thumbnails/4.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042706/58a357791a28ab14598b59f1/html5/thumbnails/5.jpg)
Definition of classClass are the combination of
functions and variables.
![Page 6: Oops project newton second law of motion](https://reader034.vdocuments.us/reader034/viewer/2022042706/58a357791a28ab14598b59f1/html5/thumbnails/6.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042706/58a357791a28ab14598b59f1/html5/thumbnails/7.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042706/58a357791a28ab14598b59f1/html5/thumbnails/8.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042706/58a357791a28ab14598b59f1/html5/thumbnails/9.jpg)
functionVoid show_data: Its shows the data in the outputFor Example (Cout<<“multiple”<<a*b;)
![Page 10: Oops project newton second law of motion](https://reader034.vdocuments.us/reader034/viewer/2022042706/58a357791a28ab14598b59f1/html5/thumbnails/10.jpg)
functionsVoid formulaf=m*aF=forceM=massA=acceleration
![Page 11: Oops project newton second law of motion](https://reader034.vdocuments.us/reader034/viewer/2022042706/58a357791a28ab14598b59f1/html5/thumbnails/11.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042706/58a357791a28ab14598b59f1/html5/thumbnails/12.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042706/58a357791a28ab14598b59f1/html5/thumbnails/13.jpg)
Void show_data (){ “Newton second law of motion F=“ cout<<“force=“;Cout<<i<<endl;}};Main()
![Page 14: Oops project newton second law of motion](https://reader034.vdocuments.us/reader034/viewer/2022042706/58a357791a28ab14598b59f1/html5/thumbnails/14.jpg)
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](https://reader034.vdocuments.us/reader034/viewer/2022042706/58a357791a28ab14598b59f1/html5/thumbnails/15.jpg)