Sie sind auf Seite 1von 24

MEMBERS : SARVANA KALIANNAN 2130044

LIM LI MENG 2130515




LECTURER : DR AMALINA FARHI AHMAD FADZILAH





DESCRIPTION

Our country defense unit does have a lot of combat vehicle. These vehicles being used to protect our
country from any kind of problem. The vehicles involve in the exercise will undergo a very tough
situation where it will have to be sent for repair or services. Previously, our country defense unit have
been using paperwork method to gain all the information related to the vehicle which have been sent to
the workshop. It takes a very long time and the foremen have to complete a report regarding the vehicle
which have to undergo the repairing and/or service process. This is very much time consuming and
sometimes the vehicle could not be fully maintained because the previous report of the vehicle could not
be referred properly or might can be lost

This programming system is mainly created to ease the job to record all the service or/and repairing
information of combat vehicle. This system is to sum up the total cost of the repair and/or service of the
vehicle, to submit full report to the MinDef and to the regiment which the vehicle belongs to. Moreover,
the complete report will be used for further repair and service by the foremen. This could provide better
information about the service or/and repairing information of combat vehicle.















ALGORITHM
1. Display the system title COMBAT VEHICLE SERVICE AND REPAIR REPORT SYSTEM
2. Display Please enter your name : to enter the officers name.
3. Input the officers name.
4. Display Please enter your ID number : to enter the officers id number.
5. Input the officers id number.
6. Display Please enter your vehicles registration number : to enter the vehicle registration
number.
7. Input the vehicles registration number.
8. Display " Please enter your vehicles model/brand : "
9. Input the vehicles model/brand.
10. Display CHOOSE YOUR OPTION : to select from the menu given.
11. Display 0. Close The Portal.
12. Display " 1. Price List
13. Display " 2. Vehicle Service
14. Display " 3. Vehicle Repair
15. Display " 4. Service or Repair Report
16. Display YOUR OPTION IS to enter the integer of the option preferred.
17. Input the integer of the option preferred. (0-4)
18. If 1 is selected in the menu, the system will display "THE PRICE LIST FOR TYPE OF
SERVICES AND PART/S TO REPAIR : " to display the list of prices of the type of service and
the prices of repairing the parts of the combat vehicle.
19. Display TYPE OF SERVICE and THE PRICE
20. Display Full Service RM 3000
21. Display Partial Service RM 1500
22. Display VEHICLE PARTS PRICE
23. Display body RM 3000
24. Display tyres RM 2000
25. Display engine RM3000
26. Display paint RM 2000
27. Display electronics RM 2500
28. Display suspension RM 2000
29. Display CHOOSE YOUR OPTION : to select from the menu given.
30. Display 0. Close The Portal.
31. Display " 1. Price List
32. Display " 2. Vehicle Service
33. Display " 3. Vehicle Repair
34. Display " 4. Service or Repair Report
35. Display YOUR OPTION IS to enter the integer of the option preferred.
36. Input the integer of the option preferred. (0-4)
37. If 2 is selected in the menu, the system will display CHOOSE THE TYPE OF SERVICE : .
38. Display Full Service .
39. Display Partial Service.
40. Display THE TYPE OF SERVICE YOU CHOOSE : .
41. Input the type of service you choose to choose the type of preferred service.
42. Display THE COST OF THE SERVICE THAT YOU CHOOSE IS RM :
43. Input the cost of the service that you choose to enter the cost of the service preferred as from the
price list.
44. Display CHOOSE YOUR OPTION : to select from the menu given.
45. Display 0. Close The Portal.
46. Display " 1. Price List
47. Display " 2. Vehicle Service
48. Display " 3. Vehicle Repair
49. Display " 4. Service or Repair Report
50. Display YOUR OPTION IS to enter the integer of the option preferred.
51. Input the integer of the option preferred. (0-4)
52. If 3 is selected in the menu, the system will display CHOOSE THE PART/S NEED TO
REPAIR: .
53. Display body
54. Display tyres
55. Display engine
56. Display paint
57. Display electronics
58. Display suspension
59. Display YOUR CHOICE IS :
60. Input your preferred choice of part that need to be repair.
61. Display "THE COST OF THE PART/S THAT YOU CHOOSE IS RM :";
62. Input the cost of the parts that need to repair that you choose to enter the cost of the parts that
need to repair preferred as from the price list.
63. Display CHOOSE YOUR OPTION : to select from the menu given.
64. Display 0. Close The Portal.
65. Display " 1. Price List
66. Display " 2. Vehicle Service
67. Display " 3. Vehicle Repair
68. Display " 4. Service or Repair Report
69. Display YOUR OPTION IS to enter the integer of the option preferred.
70. Input the integer of the option preferred. (0-4)
71. If 4 is selected in the menu, the system will display COMBAT VEHICLE SERVICE and
REPAIR REPORT
72. Display officers name, officers id number, vehicle registration number, vehicles
model/brand.
73. Display THE TYPE OF SERVICE YOU CHOOSE :.
74. Fetch the input of the type of service you choose .
75. Display THE PARTS THAT NEED TO REPAIR :.
76. Fetch the input of your preferred choice of part that need to be repair
77. Display THE COST OF THE VEHICLE SERVICE RM :.
78. Fetch the input of the cost of the type of service you choose.
79. Display THE COST OF THE VEHICLE REPAIR RM :
80. Fetch the input of the cost of the parts that need to repair .
81. Display THE TOTAL COST FOR THE SERVICE AND/OR THE REPAIR IS RM : .
82. Calculate the sum of the the cost of the parts that need to repair and the cost of the type of
service you choose.
83. Display CHOOSE YOUR OPTION : to select from the menu given.
84. Display 0. Close The Portal.
85. Display " 1. Price List
86. Display " 2. Vehicle Service
87. Display " 3. Vehicle Repair
88. Display " 4. Service or Repair Report
89. Display YOUR OPTION IS to enter the integer of the option preferred.
90. Input the integer of the option preferred. (0-4)
91. If 0 is selected in the menu, the system will display press any key to continue .



















FLOWCHART

























START
char Your_Name[50];
int id_number;
char vehicle_registration_number[50];
char model_or_brand[50];
int menu();
void enter1();
void enter2();
void enter3();
void report();
int choice;
char service_type[50];
int service_cost;
int body;
int tyres;
int engine;
int paint;
int electronics;
int suspension;
int total_service_cost;
int total_repair_cost;
char repair_type[50];
int repair_cost;
int total_cost;
int Full_Service;
int Partial_Service;

Print COMBAT VEHICLE
SERVICE AND REPAIR REPORT
SYSTEM
Print Please enter your name :

Read Your_Name[50]:

A


























Print Please enter your ID number :
A
Read id_number
Print Please enter your vehicles registration number :
Read vehicle_registration_number[50]

Print CHOOSE YOUR OPTION :
Print 0. Close The Portal.
Print " Please enter your vehicles model/brand : "
Read model_or_brand[50]

B


























Print .1 Price List.
B
Print " 2. Vehicle Service
Print " 3. Vehicle Repair
Print " 4. Service or Repair Report
menu() = 1
C
Print YOUR OPTION IS
v
Print "THE PRICE LIST FOR TYPE OF SERVICES
AND PART/S TO REPAIR : "
Print TYPE OF SERVICE and THE PRICE

Print Full Service RM 3000
Print Partial Service RM 1500

Print VEHICLE PARTS and PRICE

no
yes


























menu() = 2

C
Print body RM 3000
Print tyres RM 2000
Print engine RM3000
Print paint RM 2000
Print electronics RM 2500
Print suspension RM 2000


Print CHOOSE THE TYPE OF SERVICE : .
Print Full Service .
Print Partial Service.
Print THE COST OF THE SERVICE
THAT YOU CHOOSE IS RM :
Print THE TYPE OF SERVICE YOU CHOOSE IS : .


Read service_type[50]
Read service_cost
D D
yes
no


























menu() = 3

v
Print CHOOSE THE PART/S NEED TO REPAIR: .
Print body
Print tyres
Print engine
Print paint
Print electronics
Print suspension

Print YOUR CHOICE IS :


Read repair_type[50]


Print "THE COST OF THE PART/S
THAT YOU CHOOSE IS RM :"
Read repair_cost;


menu() = 4

Read Your_Name[50]
Read id_number
Read vehicle_registration_number[50]
Read model_or_brand[50].


D
E
no
no
yes
yes
Print THE TYPE OF SERVICE
YOU CHOOSE :.


























Read service_type[50]
E


Print THE PARTS THAT NEED TO
REPAIR :.


Read repair_type[50]



Print THE COST OF THE VEHICLE
SERVICE RM :.


Read service_cost

Read repair_cost;



Print THE COST OF THE VEHICLE
REPAIR RM :


Print THE TOTAL COST FOR THE
SERVICE AND/OR THE REPAIR IS RM :
.
F


























F

Read total_cost


total_cost = service_cost +
repair_cost;

menu() = 0
no
yes
END
// C++Project.cpp : Defines the entry point for the console application.
//

#include"stdafx.h"
#include<iostream>
using namespace std;
char Your_Name[50];
int id_number;
char vehicle_registration_number[50];
char model_or_brand[50];

int menu();
void enter1();
void enter2();
void enter3();
void report();
int choice;

char service_type[50];
int service_cost;
int body;
int tyres;
int engine;
int paint;
int electronics;
int suspension;
int total_service_cost;
int total_repair_cost;
char repair_type[50];
int repair_cost;
int total_cost;
int Full_Service;
int Partial_Service;

int main()

{

cout << " \t\t*********************************************** " << endl;
cout << " \t\tCOMBAT VEHICLE SERVICE and REPAIR REPORT SYSTEM " << endl;
cout << " \t\t*********************************************** " << endl;
cout << endl;
cout << endl;

cout << "Please enter your name : ";
cin >> Your_Name;
cout << endl;
cout << "Please enter your ID number : ";
cin >> id_number;
cout << endl;
cout << "Please enter your vehicle's registration number : ";
cin >> vehicle_registration_number;
cout << endl;
cout << "Please enter your vehicle's model/brand : ";
cin >> model_or_brand;
cout << endl;
cout << endl;


do {
choice = menu();
switch (choice) {
case 0: break;
case 1: enter1();
break;
case 2: enter2();
break;
case 3: enter3();
break;
case 4: report();
break;
default: cout << "INVALID INPUT.PLEASE TRY AGAIN.\n\n";
}
} while (choice != 0);

return 0;
}


int menu()
{


int choice;
cout << endl;
cout << endl;
cout <<
"><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< "
<< endl;
cout << endl;
cout << "CHOOSE YOUR OPTION : " << endl;
cout << endl;
cout << "0. Close The Portal\n";
cout << "1. Price List \n";
cout << "2. Vehicle Service \n";
cout << "3. Vehicle Repair \n";
cout << "4. Service or Repair Report \n";
cout << endl;
cout << "YOUR OPTION IS :";
cin >> choice;
cout << endl;
cout <<
"><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< "
<< endl;
return choice;

}




void enter1()
{
int i;
for (i = 0; i < 1; i++) {
cout << endl;
cout << "------------------------------------------------------------------
-------------- " << endl;
cout << endl;
cout << "THE PRICE LIST FOR TYPE OF SERVICES AND PART/S TO REPAIR : " <<
endl;
cout << endl;
cout << " TYPE OF SERVICE \t\tPRICE" << endl;
cout << endl;
cout << "\ta) Full Service \tRM 3000" << endl;
cout << "\tb) Partial Service \tRM 1500 " << endl;
cout << endl;
cout << endl;
cout << " VEHICLE PARTS \t\tPRICE" << endl;
cout << endl;
cout << "\ta) body \t\tRM 3000 " << endl;
cout << "\tb) tyres \t\tRM 2000 " << endl;
cout << "\tc) engine \t\tRM 3000 " << endl;
cout << "\td) paint \t\tRM 2000 " << endl;
cout << "\te) electronics \t\tRM 2500 " << endl;
cout << "\tf) suspension \t\tRM 2000 " << endl;
cout << endl;
cout << endl;
cout << "------------------------------------------------------------------
-------------- " << endl;



}
}

void enter2()
{
int i;
for (i = 0; i<1; i++) {
cout << endl;
cout << endl;
cout << "------------------------------------------------------------------
-------------- " << endl;
cout << endl;
cout << "CHOOSE THE TYPE OF SERVICE : " << endl;
cout << endl;
cout << "\t\ta)Full Service " << endl;
cout << "\t\tb)Partial Service " << endl;
cout << endl;
cout << "THE TYPE OF SERVICE YOU CHOOSE : ";
cin >> service_type;
cout << endl;
cout << endl;
cout << "THE COST OF THE SERVICE THAT YOU CHOOSE IS RM :";
cin >> service_cost;
cout << endl;
total_service_cost = service_cost;
cout << "------------------------------------------------------------------
-------------- " << endl;

}
}


void enter3()
{
int i;
for (i = 0; i < 1; i++) {
cout << endl;
cout << endl;
cout << "------------------------------------------------------------------
-------------- " << endl;
cout << endl;
cout << "CHOOSE THE PART/S NEED TO REPAIR " << endl;
cout << endl;
cout << "\ta) body " << endl;
cout << "\tb) tyres " << endl;
cout << "\tc) engine " << endl;
cout << "\td) paint " << endl;
cout << "\te) electronics " << endl;
cout << "\tf) suspension " << endl;
cout << endl;
cout << "YOUR CHOICE IS :";
cin >> repair_type;
cout << endl;
cout << endl;
cout << "THE COST OF THE PART/S THAT YOU CHOOSE IS RM :";
cin >> repair_cost;
cout << endl;
cout << endl;
total_repair_cost = repair_cost;
cout << "------------------------------------------------------------------
-------------- " << endl;

}
}


void report()
{
int i;

for (i = 0; i < 1; i++) {
cout << "COMBAT VEHICLE SERVICE and REPAIR REPORT" << endl;
cout << endl;
cout << endl;
cout << Your_Name <<' '<< id_number << '\n';
cout << vehicle_registration_number << ' ' << model_or_brand << '\n';
cout << endl;
cout <<
"============================================================================== "
<< endl;
cout << "THE TYPE OF SERVICE YOU CHOOSE : " << service_type;
cout << endl;
cout << endl;
cout << "THE PARTS THAT NEED TO REPAIR : " << repair_type;
cout << endl;
cout << endl;
cout << "THE COST OF THE VEHICLE SERVICE RM : " << total_service_cost;
cout << endl;
cout << endl;
cout << "THE COST OF THE VEHICLE REPAIR RM : " << total_repair_cost;
cout << endl;
cout << endl;
total_cost = total_service_cost + total_repair_cost;
cout << "THE TOTAL COST FOR THE SERVICE AND/OR THE REPAIR IS RM : " <<
total_cost;
cout <<
"=============================================================================== "
<< endl;
cout << endl;
}


}

Das könnte Ihnen auch gefallen