answersLogoWhite

0

Not to be blunt, but if you want code for an "airline program", then you have to actually sit down and write it yourself. What constitutes an "airline program"? Is it a flight simulator or a business simulator? Either way, nobody is simply going to give you the code for a non-trivial application such as this.

To write one yourself, first think about all the types you will need. Given it is an airline you will obviously need an "aeroplane" base class from which all types of aircraft will be derived. Everything that is common to all aircraft (both attributes and interface) should be encapsulated by your base class, with specific implementation details handled by your specific derivatives. You may also find it easier if you break your abstract aeroplane down in to separate components (landing gear, flight controls, engines, fuel, and so on), thus making it possible to construct specific aeroplanes from specific components.

You must also consider the "world" object; the arena in which your simulation is set, which will naturally include airports. If it is a business simulation, you must also consider passengers, cargo, ground crews -- and competitors! Each of these types must be modelled separately using individual classes, both abstract and concrete. Once you have all your types defined, concentrate on the algorithms that will allow these types to interact in meaningful ways. Identify common features and use templates as much as possible to keep code duplication to a minimum.

With your types and algorithms in place you can then concentrate on the graphical side of things; how to present these types to the end-user. Finally, you can provide the "script" that brings everything together.

Clearly this is not a project you will complete overnight; it may take years all by yourself. But only by getting your hands dirty with such a project will you appreciate just how much effort actually goes into writing non-trivial software and why no-one is simply going to give you the code.

There are plenty of programming forums that will provide free help if you get stuck, but you have to actually make some effort first. Nobody is going to do your homework for you. You're not in school anymore.

User Avatar

Wiki User

9y ago

What else can I help you with?

Continue Learning about Engineering

How do you convert from assembly to binary in c plus plus?

Use inline assembly instructions. Then compile your C++ program to produce the machine code.


Is C plus plus interpreted as the program is executed?

No. Neither C nor C++ are interpreted. Both need to be compiled and linked to produce highly-optimised machine code, which is then executed.


Is it true that a c plus plus program is similar to a c program except for the details of coding?

No. A C++ program is not even remotely similar to a C program. While it is true that with little to no modification any valid C program can become a valid C++ program, the resultant code would still be C or at least the C-style equivalent that is supported by C++. However, the same cannot be said in the other direction. Converting C++ code to C can obviously be done (code in any language can be converted to any other language), but it is far from trivial. Indeed, the only way it could be achieved effectively and efficiently is with a C++ to C compiler, in much the same way as the original C++ compiler worked. However it's difficult to imagine any scenario where this would be a requirement.


What must an opening brace in a C plus plus program be?

An opening brace must be terminated with a closing brace in C++. Braces are used to enclose code blocks and initialiser lists.


Can a function be called from more than one place in a program in c plus plus?

In C and C++, as well as in many (all?) languages, a function can be called from more than one place in a program. That's the purpose of functions - to encapsulate pieces of code that are needed in more than one place in the program.

Related Questions

How do you convert from assembly to binary in c plus plus?

Use inline assembly instructions. Then compile your C++ program to produce the machine code.


What is the general structure of a C plus plus Language?

The central feature of any C++ program is classes which can be used to express ideas directly in code.


Can you program games with c plus plus?

Yes, you can program games with C++.


How do you write an Algorithm for a C plus plus Program?

You don't write an algorithm for a C++ program, unless you are documenting the C++ program after-the-fact. The normal procedure is to write the algorithm first, in a language independent fashion, and then translate that stated algorithm into C++ code, or into whatever language you wish.


How can you turn a C plus plus program into a dot exe to run on a PC without a compiler?

To make C++ code into an executable program, you need a compiler. Compilation of a program doesn't have to be on the same computer as the one it's intended to be used on.


Is C plus plus interpreted as the program is executed?

No. Neither C nor C++ are interpreted. Both need to be compiled and linked to produce highly-optimised machine code, which is then executed.


Is C plus plus preprocessor software?

Sometimes, it is. Some implementations compile C++ code into C code, and then compile the C code.


Does Adobe Flash use c plus plus scripting?

No, it does not. While the program itself was written in C++, Flash does not support C++. Any code inside your Flash project must be written in Actionscript.


How to restart c plus plus program?

Exit the program and relaunch it.


Is it true that a c plus plus program is similar to a c program except for the details of coding?

No. A C++ program is not even remotely similar to a C program. While it is true that with little to no modification any valid C program can become a valid C++ program, the resultant code would still be C or at least the C-style equivalent that is supported by C++. However, the same cannot be said in the other direction. Converting C++ code to C can obviously be done (code in any language can be converted to any other language), but it is far from trivial. Indeed, the only way it could be achieved effectively and efficiently is with a C++ to C compiler, in much the same way as the original C++ compiler worked. However it's difficult to imagine any scenario where this would be a requirement.


What must an opening brace in a C plus plus program be?

An opening brace must be terminated with a closing brace in C++. Braces are used to enclose code blocks and initialiser lists.


Can a function be called from more than one place in a program in c plus plus?

In C and C++, as well as in many (all?) languages, a function can be called from more than one place in a program. That's the purpose of functions - to encapsulate pieces of code that are needed in more than one place in the program.