SlideShare a Scribd company logo
1 of 19
C++
Name:- Sonu.S.S
Class:- 11.B
Roll No:- 30
School:- Indian School Darsait
Wage Calculator
Contents
Sl. No Name Page. No
1 Acknowledgement 1
2 Introduction 2
3 System Requirement 3
4 Source 4
5 Output 13
6 Conclusions 16
7 Reference 17
Acknowledgment
 At the outset, I would like to express
my sincere gratitude to my school,
for providing me with such an
opportunity to showcase my skills,
my teachers for their guidance; and
to each and every one who
contributed to making this project a
reality. Above all, I would like to
thank God the Almighty for giving me
the strength and endurance to
undertaken this project and execute
it to the best of my abilities.
WageCalculator 1
Introduction
 The program is created to help the user
calculate the wage of his employees.
 It accepts the hours the employee worked and
the wage to be paid per hour.
 It helps to calculate wages for X no of
employees.
 The program is written in both user friendly
and compiler friendly manner.
 The program source contains comments which
helps in the readability of the program.
 The program also have used user defined
functions and array of objects.
WageCalculator 2
System Requirements
 Hardware
 OS Microsoft® Windows Vista™
Home Premium
 System Name DELL-PC
 System Model Studio 1537
 Processor Intel(R) Core(TM)2
Duo CPU T6400 @ 2.00GHz,
2000 Mhz, 2 Core(s), 2 Logical
Processor(s)
 Software
 Borland C++ for Windows
 Version 3.1
WageCalculator 3
Source
#include <iostream.h>
#include<stdlib.h>
// function prototyping
int menu(); // funciton to display the menu
void enter(); // function to enter info
void report(); // function to print report
// Global variables:
char name[20][80];// this array holds employee names
char phone[20][20];// their phone numbers
float hours[20]; // hours worked per week
float wage[20]; // wage
int choice;
int main()
WageCalculator 4
{
do {
choice = menu(); // get selection
switch(choice) {
case 0: break;
case 1: enter();
break;
case 2: report();
break;
default: cout << "Try again.nn";
}
} while(choice != 0);
return 0; // Return a user's selection.
}
WageCalculator 5
int menu()
{
int choice;
cout << "0. Quitn";
cout << "1. Enter informationn";
cout << "2. Report informationn";
cout << "nChoose one: ";
cin >> choice;
return choice;
}
void enter() // Enter information.
{
int i,n;
WageCalculator 6
cout<<"n enter number of employees";
cin>>n;
for(i=0; i<n; i++)
{
cout << "Enter last name: ";
cin >> name[i];
cout << "Enter phone number: ";
cin >> phone[i];
cout << "Enter number of hours worked: ";
cin >> hours[i];
cout << "Enter wage: ";
cin >> wage[i];
}
}
WageCalculator 7
// Display report.
void report()
{
int i,n;
cout<<"n enter number of employees to be reported";
cin>>n;
for(i=0; i<n; i++)
{
cout << name[i] << ' ' << phone[i] << 'n';
cout << "Pay for the week: " << wage[i] * hours[i];
cout << 'n';
}
}
int main()
WageCalculator 8
{
do {
choice = menu(); // get selection
switch(choice) {
case 0: break;
case 1: enter();
break;
case 2: report();
break;
default: cout << "Try again.nn";
}
} while(choice != 0);
return 0; // Return a user's selection.
}
WageCalculator 9
int menu()
{
int choice;
cout << "0. Quitn";
cout << "1. Enter informationn";
cout << "2. Report informationn";
cout << "nChoose one: ";
cin >> choice;
return choice;
}
// Enter information.
void enter()
{
WageCalculator 10
int i;
for(i=0; i<2; i++)
{
cout << "Enter last name: ";
cin >> name[i];
cout << "Enter phone number: ";
cin >> phone[i];
cout << "Enter number of hours worked: ";
cin >> hours[i];
cout << "Enter wage: ";
cin >> wage[i];
}
}
WageCalculator 11
// Display report.
void report()
{
int i;
for(i=0; i<2; i++)
{
cout << name[i] << ' ' << phone[i] << 'n';
cout << "Pay for the week: " << wage[i] * hours[i];
cout << 'n';
}
}
WageCalculator 12
Output
WageCalculator 13
WageCalculator 14
WageCalculator 15
Conclusion
 The above program accepts the details of the
number of employees the user wants to enter.
 The employees details are accepted.
 The hours the employee worked ant the wage
per hour is entered.
 Te total wage to be paid to the employee is
calculated.
 If the user wants the details of the selected no
of employees are displayed.
 It helps the user to pay the wages of the
employee.
WageCalculator 16
Reference
Book
Name
Author Publisher
Computer
Science
with C++
(class 11)
Sumita
Arora
Dhanpat
Rai &
Co.(Pvt).Lt
d
WageCalculator 17

More Related Content

What's hot

Oops practical file
Oops practical fileOops practical file
Oops practical file
Ankit Dixit
 
Control Structures
Control StructuresControl Structures
Control Structures
Ghaffar Khan
 

What's hot (20)

Function overloading
Function overloadingFunction overloading
Function overloading
 
Operators in java
Operators in javaOperators in java
Operators in java
 
Presentation of 3rd Semester C++ Project
Presentation of 3rd Semester C++ ProjectPresentation of 3rd Semester C++ Project
Presentation of 3rd Semester C++ Project
 
Constructors & destructors
Constructors & destructorsConstructors & destructors
Constructors & destructors
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in java
 
project on snake game in c language
project on snake game in c languageproject on snake game in c language
project on snake game in c language
 
Vb.net ide
Vb.net ideVb.net ide
Vb.net ide
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 
Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language
 
INLINE FUNCTION IN C++
INLINE FUNCTION IN C++INLINE FUNCTION IN C++
INLINE FUNCTION IN C++
 
Oops practical file
Oops practical fileOops practical file
Oops practical file
 
Polymorphism in c++(ppt)
Polymorphism in c++(ppt)Polymorphism in c++(ppt)
Polymorphism in c++(ppt)
 
c++ lab manual
c++ lab manualc++ lab manual
c++ lab manual
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
 
Java input
Java inputJava input
Java input
 
OOP java
OOP javaOOP java
OOP java
 
Control Structures
Control StructuresControl Structures
Control Structures
 
Applets in java
Applets in javaApplets in java
Applets in java
 
College Management System
College Management SystemCollege Management System
College Management System
 
Constructors in C++
Constructors in C++Constructors in C++
Constructors in C++
 

Similar to C++ project

CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docxCMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
clarebernice
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd march
Rajeev Sharan
 
Pro.docx
Pro.docxPro.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
AASTHA76
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 sol
IIUM
 
Java programI made this Account.java below. Using the attached cod.pdf
Java programI made this Account.java below. Using the attached cod.pdfJava programI made this Account.java below. Using the attached cod.pdf
Java programI made this Account.java below. Using the attached cod.pdf
fathimafancy
 
I need help to modify my code according to the instructions- Modify th.pdf
I need help to modify my code according to the instructions- Modify th.pdfI need help to modify my code according to the instructions- Modify th.pdf
I need help to modify my code according to the instructions- Modify th.pdf
pnaran46
 
Cs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALCs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUAL
Prabhu D
 
#include iostream#includectimeusing namespace std;void.docx
#include iostream#includectimeusing namespace std;void.docx#include iostream#includectimeusing namespace std;void.docx
#include iostream#includectimeusing namespace std;void.docx
mayank272369
 

Similar to C++ project (20)

CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docxCMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
 
OOP program questions with answers
OOP program questions with answersOOP program questions with answers
OOP program questions with answers
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd march
 
c++ practical Digvajiya collage Rajnandgaon
c++ practical  Digvajiya collage Rajnandgaonc++ practical  Digvajiya collage Rajnandgaon
c++ practical Digvajiya collage Rajnandgaon
 
Cbse computer science (c++) class 12 board project bank managment system
Cbse computer science (c++)  class 12 board project  bank managment systemCbse computer science (c++)  class 12 board project  bank managment system
Cbse computer science (c++) class 12 board project bank managment system
 
Pro.docx
Pro.docxPro.docx
Pro.docx
 
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
Cbsecomputersciencecclass12boardproject bankmanagmentsystem-180703065625-conv...
 
PROGRAMMING QUESTIONS.docx
PROGRAMMING QUESTIONS.docxPROGRAMMING QUESTIONS.docx
PROGRAMMING QUESTIONS.docx
 
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 sol
 
CP 04.pptx
CP 04.pptxCP 04.pptx
CP 04.pptx
 
Java programI made this Account.java below. Using the attached cod.pdf
Java programI made this Account.java below. Using the attached cod.pdfJava programI made this Account.java below. Using the attached cod.pdf
Java programI made this Account.java below. Using the attached cod.pdf
 
I need help to modify my code according to the instructions- Modify th.pdf
I need help to modify my code according to the instructions- Modify th.pdfI need help to modify my code according to the instructions- Modify th.pdf
I need help to modify my code according to the instructions- Modify th.pdf
 
Cs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALCs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUAL
 
Lab-11-C-Problems.pptx
Lab-11-C-Problems.pptxLab-11-C-Problems.pptx
Lab-11-C-Problems.pptx
 
I PUC CS Lab_programs
I PUC CS Lab_programsI PUC CS Lab_programs
I PUC CS Lab_programs
 
Lecture2.ppt
Lecture2.pptLecture2.ppt
Lecture2.ppt
 
#include iostream#includectimeusing namespace std;void.docx
#include iostream#includectimeusing namespace std;void.docx#include iostream#includectimeusing namespace std;void.docx
#include iostream#includectimeusing namespace std;void.docx
 
C# labprograms
C# labprogramsC# labprograms
C# labprograms
 
Input output
Input outputInput output
Input output
 

More from Sonu S S (8)

Question
QuestionQuestion
Question
 
Group discussion
Group discussionGroup discussion
Group discussion
 
Google it
Google itGoogle it
Google it
 
Natural vegetation and wild life
Natural vegetation and wild lifeNatural vegetation and wild life
Natural vegetation and wild life
 
Debate
DebateDebate
Debate
 
We and our hormones
We and our hormonesWe and our hormones
We and our hormones
 
Viroids and prions
Viroids and prionsViroids and prions
Viroids and prions
 
Subrahmanyan chandrasekhar
Subrahmanyan chandrasekharSubrahmanyan chandrasekhar
Subrahmanyan chandrasekhar
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 

C++ project

  • 1. C++ Name:- Sonu.S.S Class:- 11.B Roll No:- 30 School:- Indian School Darsait Wage Calculator
  • 2. Contents Sl. No Name Page. No 1 Acknowledgement 1 2 Introduction 2 3 System Requirement 3 4 Source 4 5 Output 13 6 Conclusions 16 7 Reference 17
  • 3. Acknowledgment  At the outset, I would like to express my sincere gratitude to my school, for providing me with such an opportunity to showcase my skills, my teachers for their guidance; and to each and every one who contributed to making this project a reality. Above all, I would like to thank God the Almighty for giving me the strength and endurance to undertaken this project and execute it to the best of my abilities. WageCalculator 1
  • 4. Introduction  The program is created to help the user calculate the wage of his employees.  It accepts the hours the employee worked and the wage to be paid per hour.  It helps to calculate wages for X no of employees.  The program is written in both user friendly and compiler friendly manner.  The program source contains comments which helps in the readability of the program.  The program also have used user defined functions and array of objects. WageCalculator 2
  • 5. System Requirements  Hardware  OS Microsoft® Windows Vista™ Home Premium  System Name DELL-PC  System Model Studio 1537  Processor Intel(R) Core(TM)2 Duo CPU T6400 @ 2.00GHz, 2000 Mhz, 2 Core(s), 2 Logical Processor(s)  Software  Borland C++ for Windows  Version 3.1 WageCalculator 3
  • 6. Source #include <iostream.h> #include<stdlib.h> // function prototyping int menu(); // funciton to display the menu void enter(); // function to enter info void report(); // function to print report // Global variables: char name[20][80];// this array holds employee names char phone[20][20];// their phone numbers float hours[20]; // hours worked per week float wage[20]; // wage int choice; int main() WageCalculator 4
  • 7. { do { choice = menu(); // get selection switch(choice) { case 0: break; case 1: enter(); break; case 2: report(); break; default: cout << "Try again.nn"; } } while(choice != 0); return 0; // Return a user's selection. } WageCalculator 5
  • 8. int menu() { int choice; cout << "0. Quitn"; cout << "1. Enter informationn"; cout << "2. Report informationn"; cout << "nChoose one: "; cin >> choice; return choice; } void enter() // Enter information. { int i,n; WageCalculator 6
  • 9. cout<<"n enter number of employees"; cin>>n; for(i=0; i<n; i++) { cout << "Enter last name: "; cin >> name[i]; cout << "Enter phone number: "; cin >> phone[i]; cout << "Enter number of hours worked: "; cin >> hours[i]; cout << "Enter wage: "; cin >> wage[i]; } } WageCalculator 7
  • 10. // Display report. void report() { int i,n; cout<<"n enter number of employees to be reported"; cin>>n; for(i=0; i<n; i++) { cout << name[i] << ' ' << phone[i] << 'n'; cout << "Pay for the week: " << wage[i] * hours[i]; cout << 'n'; } } int main() WageCalculator 8
  • 11. { do { choice = menu(); // get selection switch(choice) { case 0: break; case 1: enter(); break; case 2: report(); break; default: cout << "Try again.nn"; } } while(choice != 0); return 0; // Return a user's selection. } WageCalculator 9
  • 12. int menu() { int choice; cout << "0. Quitn"; cout << "1. Enter informationn"; cout << "2. Report informationn"; cout << "nChoose one: "; cin >> choice; return choice; } // Enter information. void enter() { WageCalculator 10
  • 13. int i; for(i=0; i<2; i++) { cout << "Enter last name: "; cin >> name[i]; cout << "Enter phone number: "; cin >> phone[i]; cout << "Enter number of hours worked: "; cin >> hours[i]; cout << "Enter wage: "; cin >> wage[i]; } } WageCalculator 11
  • 14. // Display report. void report() { int i; for(i=0; i<2; i++) { cout << name[i] << ' ' << phone[i] << 'n'; cout << "Pay for the week: " << wage[i] * hours[i]; cout << 'n'; } } WageCalculator 12
  • 18. Conclusion  The above program accepts the details of the number of employees the user wants to enter.  The employees details are accepted.  The hours the employee worked ant the wage per hour is entered.  Te total wage to be paid to the employee is calculated.  If the user wants the details of the selected no of employees are displayed.  It helps the user to pay the wages of the employee. WageCalculator 16
  • 19. Reference Book Name Author Publisher Computer Science with C++ (class 11) Sumita Arora Dhanpat Rai & Co.(Pvt).Lt d WageCalculator 17