Posted by Fawad Ishaq on July 4, 2008
| Ask an Expert | Live Programming Help
|
Instructions
- You must have installed Microsoft Visual Studio 6.0/Microsoft Visual Studio .NET 2003/Microsoft Visual Studio .NET 2005 on your machine to try the programs.
- To develop the C++ program on Microsoft Visual Studio 6.0 please read the handout “How to create your first C++ program using Visual C++ 6.0”.
- To develop the C++ program on Microsoft Visual Studio .NET 2003 please read the handout How to create your first C++ program using Visual C++ .NET 2003.
- To develop the C++ program on Microsoft Visual Studio .NET 2005 please read the handout How to create your first C++ program using Visual C++ .NET 2005.
Exercise 01
1. Define a structure Employee consisting of following data members:
• Employee code (use integer type variable to store the employee code)
• Employee name (use char array of 50 elements to store the employee name)
• Department Code (use integer type variable to store the department code)
• Department name (use char array of 50 elements to store the department name)
• Salary (use double type variable to store the employee salary)
2. Declare an array of Employee type consisting of 5 elements. Use constant variable to declare an array.
3. Define a function inputEmployee that would allow the user to enter the data of five employees from the console.
void inputEmployee ( Employee[], int )
4. Define a function saveEmployee the would save the data of five employees in Employee.dat file.
void saveEmployee ( Employee[], int )
5. Create a separate program that should only write the data to an output file.
Exercise 02
1. Define a structure Employee having following data members:
• Employee code (use integer type variable to store the employee code)
• Employee name (use char array of 50 elements to store the employee name)
• Department Code (use integer type variable to store the department code)
• Department name (use char array of 50 elements to store the department name)
• Salary (use double type variable to store the employee salary)
2. Declare an array of Employee type consisting of 5 elements. Use constant variable to declare an array.
3. Define a function readEmployee that would read the data of five employees from Employee.dat file (created in exercise 01) and store in an array of type Employee.
void readEmployee ( Employee[], int )
4. Define a function printEmployee that would print the data of five employees on the console.
void printEmployee ( Employee[], int )
5. Create a separate program that should only read the data from a file and print it.
How to submit?
1. Submit your assignments to Mr. Adeel as per the schedule announced by him.
2. No assignment shall be evaluated/accepted after the due date.
3. Copy assignments will be cancelled.
4. There will be an individual viva of this assignment. Your evaluation is strictly based on your performance in the viva.
5. Non-professional behavior during the viva may lead to assignment cancellation.



| Download PDF Here |
Posted in Object-Oriented Programming in C++ | Leave a Comment »
Posted by Fawad Ishaq on July 4, 2008
| Ask an Expert | Live Programming Help
|
Instructions
- You must have installed Microsoft Visual Studio 6.0/Microsoft Visual Studio .NET 2003/Microsoft Visual Studio .NET 2005 on your machine to try the programs.
- To develop the C++ program on Microsoft Visual Studio 6.0 please read the handout “How to create your first C++ program using Visual C++ 6.0”.
- To develop the C++ program on Microsoft Visual Studio .NET 2003 please read the handout How to create your first C++ program using Visual C++ .NET 2003.
- To develop the C++ program on Microsoft Visual Studio .NET 2005 please read the handout How to create your first C++ program using Visual C++ .NET 2005.
Exercise 01
1. Define a structure Employee consisting of following data members:
• Employee code (use integer type variable to store the employee code)
• Employee name (use char array of 50 elements to store the employee name)
• Department Code (use integer type variable to store the department code)
• Department name (use char array of 50 elements to store the department name)
• Salary (use double type variable to store the employee salary)
2. Declare an array of Employee type consisting of 5 elements. Use constant variable to declare an array.
3. The program should allow the user to enter the data of five employees from the console.
4. Save the data of five employees in Employee.dat file.
5. Create a separate program that should only write the data to an output file.
Exercise 02
1. Define a structure Employee having following data members:
• Employee code (use integer type variable to store the employee code)
• Employee name (use char array of 50 elements to store the employee name)
• Department Code (use integer type variable to store the department code)
• Department name (use char array of 50 elements to store the department name)
• Salary (use double type variable to store the employee salary)
2. Declare an array of Employee type consisting of 5 elements. Use constant variable to declare an array.
3. Read the data of five employee from a Employee.dat file (created in exercise 01) and store in an array of type Employee.
4. Print the data of five employees on the console.
5. Create a separate program that should only read the data from a file and print it.
How to submit?
1. Submit your assignments to Mr. Adeel as per the schedule announced by him.
2. No assignment shall be evaluated/accepted after the due date.
3. Copy assignments will be cancelled.
4. There will be an individual viva of this assignment. Your evaluation is strictly based on your performance in the viva.
5. Non-professional behavior during the viva may lead to assignment cancellation.



| Download PDF Here |
Posted in Object-Oriented Programming in C++ | Leave a Comment »
Posted by Fawad Ishaq on July 4, 2008
| Ask an Expert | Live Programming Help
|
Instructions
- You must have installed Microsoft Visual Studio 6.0/Microsoft Visual Studio .NET 2003/Microsoft Visual Studio .NET 2005 on your machine to try the programs.
- To develop the C++ program on Microsoft Visual Studio 6.0 please read the handout “How to create your first C++ program using Visual C++ 6.0”.
- To develop the C++ program on Microsoft Visual Studio .NET 2003 please read the handout How to create your first C++ program using Visual C++ .NET 2003.
- To develop the C++ program on Microsoft Visual Studio .NET 2005 please read the handout How to create your first C++ program using Visual C++ .NET 2005.
Exercise 01
1. Define a structure Employee consisting of following data members:
• Employee code (use integer type variable to store the employee code)
• Employee name (use char array of 50 elements to store the employee name)
• Department Code (use integer type variable to store the department code)
• Department name (use char array of 50 elements to store the department name)
• Salary (use double type variable to store the employee salary)
2. Define a function initEmployee to initialize the variable of Employee type.
void initEmployee ( Employee )
3. Define a function saveEmployee to save the employee data to a Employee.dat file.
void saveEmployee( Employee )
4. Declare a variable of type Employee and initialize it using initEmployee function.
5. Save the employee data to Employee.dat file using saveEmployee function.
6. Create a separate program that should only write the data to an output file.
Exercise 02
1. Define a structure Employee having following data members:
• Employee code (use integer type variable to store the employee code)
• Employee name (use char array of 50 elements to store the employee name)
• Department Code (use integer type variable to store the department code)
• Department name (use char array of 50 elements to store the department name)
• Salary (use double type variable to store the employee salary)
2. Define a function printEmployee to print the employee data on the console.
void printEmployee( Employee )
3. Define a function readEmployee to read the Employee data from a file.
void readEmployee ( Employee )
4. Declare a variable of type Employee.
5. Read employee data from Employee.dat file (created in exercise 01) and store in variable of type Employee using the readEmployee function.
6. Print the employee data on the console using the printEmployee function.
7. Create a separate program that should only read the data from a file and print it.
How to submit
1. Submit your assignments to Mr. Adeel as per the schedule announced by him.
2. No assignment shall be evaluated/accepted after the due date.
3. Copy assignments will be cancelled.
4. There will be an individual viva of this assignment. Your evaluation is strictly based on your performance in the viva.
5. Non-professional behavior during the viva may lead to assignment cancellation.



| Download PDF Here |
Posted in Object-Oriented Programming in C++ | Leave a Comment »
Posted by Fawad Ishaq on July 4, 2008
| Ask an Expert | Live Programming Help
|
Instructions
- You must have installed Microsoft Visual Studio 6.0/Microsoft Visual Studio .NET 2003/Microsoft Visual Studio .NET 2005 on your machine to try the programs.
- To develop the C++ program on Microsoft Visual Studio 6.0 please read the handout “How to create your first C++ program using Visual C++ 6.0”.
- To develop the C++ program on Microsoft Visual Studio .NET 2003 please read the handout How to create your first C++ program using Visual C++ .NET 2003.
- To develop the C++ program on Microsoft Visual Studio .NET 2005 please read the handout How to create your first C++ program using Visual C++ .NET 2005.
Exercise 01
1. Define a structure Employee consisting of following data members:
• Employee code (use integer type variable to store the employee code)
• Employee name (use char array of 50 elements to store the employee name)
• Department Code (use integer type variable to store the department code)
• Department name (use char array of 50 elements to store the department name)
• Salary (use double type variable to store the employee salary)
2. Declare a variable of type Employee and initialize it.
3. Save the employee data to Employee.dat file.
4. Create a separate program that should only write the data to an output file.
Note: No user-defined functions required for this exercise.
Exercise 02
1. Define a structure Employee having following data members:
• Employee code (use integer type variable to store the employee code)
• Employee name (use char array of 50 elements to store the employee name)
• Department Code (use integer type variable to store the department code)
• Department name (use char array of 50 elements to store the department name)
• Salary (use double type variable to store the employee salary)
2. Declare a variable of type Employee.
3. Read employee data from Employee.dat file (created in exercise 01) and store in variable of type Employee. Print the employee data on the console.
4. Create a separate program that should only read the data from a file and print it.
Note: No user-defined functions required for this exercise.
How to submit
1. Submit your assignments to Mr. Adeel as per the schedule announced by him.
2. No assignment shall be evaluated/accepted after the due date.
3. Copy assignments will be cancelled.
4. There will be an individual viva of this assignment. Your evaluation is strictly based on your performance in the viva.
5. Non-professional behavior during the viva may lead to assignment cancellation.



| Download PDF Here |
Posted in Object-Oriented Programming in C++ | Leave a Comment »
Posted by Fawad Ishaq on July 4, 2008
| Ask an Expert | Live Programming Help
|
Instructions
- You must have installed Microsoft Visual Studio 6.0/Microsoft Visual Studio .NET 2003/Microsoft Visual Studio .NET 2005 on your machine to try the programs.
- To develop the C++ program on Microsoft Visual Studio 6.0 please read the handout “How to create your first C++ program using Visual C++ 6.0”.
- To develop the C++ program on Microsoft Visual Studio .NET 2003 please read the handout How to create your first C++ program using Visual C++ .NET 2003.
- To develop the C++ program on Microsoft Visual Studio .NET 2005 please read the handout How to create your first C++ program using Visual C++ .NET 2005.
Exercise 01
(A) Define a structure DVD having following data members:
• DVD code (use variable of type integer to store the code of the DVD)
• Movie name (use char array of 50 elements to store the movie name)
• Actor name (use char array of 50 elements to store the actor name)
• Actress name (use char array of 50 elements to store the actress name)
• Release Date (use char array of 50 elements to store the movie release date)
• Price (use variable of type double to store the price of the DVD)
(B) Create an array of DVD structure capable of holding data of not less than ten DVDs.
(C) Add a function inputDVDDetails that would allow the user to enter the DVD data, one record at a time.
void inputDVDDetails( DVD )
(D) Add a function printDVDDetails_ListView that would print the data of all the DVDs on the console in list view.
void printDVDDetails_ListView (DVD[], int )
(E) Add a function printDVDDetails_GridView that would print the data of all the DVDs on the console in grid view.
void printDVDDetails_GridView (DVD[], int )
(F) Add a feature that would allow the user to sort a DVD by code. (do it without function)
(G) Add a feature that would allow the user to sort a DVD by movie name. (do it without function)
(H) Add a feature that would allow the user to sort a DVD by actor name. (do it without function)
(I) Add a feature that would allow the user to sort a DVD by actress name. (do it without function)
(J) Add a feature that would allow the user to sort a DVD by release data. (do it without function)
(K) Add a feature that would allow the user to sort a DVD by price. (do it without function)
(L) Create a main menu with the following menu items:
• Add New
• List View
• Grid View
• Sort by DVD Code
• Sort by Movie Name
• Sort by Actor Name
• Sort by Actress Name
• Sort by Release Date
• Sort by Price
• Exit
(M) Create a separate C++ program for this exercise.
(N) The program should not allow the user to enter more than ten records.
(O) Use bubble sort algorithm to sort the data.
Exercise 02
(A) Define a structure DVD having following data members:
• DVD code (use variable of type integer to store the code of the DVD)
• Movie name (use char array of 50 elements to store the movie name)
• Actor name (use char array of 50 elements to store the actor name)
• Actress name (use char array of 50 elements to store the actress name)
• Release Date (use char array of 50 elements to store the movie release date)
• Price (use variable of type double to store the price of the DVD)
(B) Create an array of DVD structure capable of holding data of not less than ten DVDs.
(C) Add a function inputDVDDetails that would allow the user to enter the DVD data, one record at a time.
void inputDVDDetails( DVD )
(D) Add a function printDVDDetails_ListView that would print the data of all the DVDs on the console in list view.
void printDVDDetails_ListView (DVD[], int )
(E) Add a function printDVDDetails_GridView that would print the data of all the DVDs on the console in grid view.
void printDVDDetails_GridView (DVD[], int )
(F) Add a function sortByCode that would allow the user to sort the data by DVD code in either ascending order or descending order as specified by the user. If the third argument of a function is 1, the data is sorted in ascending order. If the third argument of a function is 2, the data is sorted in descending order.
void sortByCode ( DVD[], int, int )
(G) Add a function sortByMovieName that would allow the user to sort the data by DVD movie name in either ascending order or descending order as specified by the user. If the third argument of a function is 1, the data is sorted in ascending order. If the third argument of a function is 2, the data is sorted in descending order.
void sortByMovieName( DVD[], int, int )
(H) Add a function sortByActorName that would allow the user to sort the data by DVD actor name in either ascending order or descending order as specified by the user. If the third argument of a function is 1, the data is sorted in ascending order. If the third argument of a function is 2, the data is sorted in descending order.
void sortByActorName ( DVD[], int, int )
(I) Add a function sortByActressName that would allow the user to sort the data by DVD actress name in either ascending order or descending order as specified by the user. If the third argument of a function is 1, the data is sorted in ascending order. If the third argument of a function is 2, the data is sorted in descending order..
void sortByActressName ( DVD[], int, int )
(J) Add a function sortByReleaseDate that would allow the user to sort the data by DVD release date in either ascending order or descending order as specified by the user. If the third argument of a function is 1, the data is sorted in ascending order. If the third argument of a function is 2, the data is sorted in descending order.
void sortByReleaseDate ( DVD[], int, int )
(K) Add a function sortByPrice that would allow the user to sort the data by DVD price in either ascending order or descending order as specified by the user. If the third argument of a function is 1, the data is sorted in ascending order. If the third argument of a function is 2, the data is sorted in descending order..
void sortByPrice ( DVD[], int, int )
(L) Create a main menu with the following menu items:
• Add New
• List View
• Grid View
• Search by DVD Code
• Search by Movie Name
• Search by Actor Name
• Search by Actress Name
• Search by Release Date
• Search by Price
• Exit
(M) Create a separate C++ program for this exercise.
(N) The program should not allow the user to enter more than ten records.
(O) Use bubble sort algorithm to sort the data.
How to submit
1. Submit your assignments to Mr. Adeel as per the schedule announced by him.
2. No assignment shall be evaluated/accepted after the due date.
3. Copy assignments will be cancelled.
4. There will be an individual viva of this assignment. Your evaluation is strictly based on your performance in the viva.
5. Non-professional behavior during the viva may lead to assignment cancellation.



| Download PDF Here |
Posted in Object-Oriented Programming in C++ | Leave a Comment »