12.12.2012 Views

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

266 Week 1<br />

and turn it <strong>in</strong>to a work<strong>in</strong>g program. You can’t necessarily do that at this po<strong>in</strong>t, but you can<br />

get a good start. The program doesn’t have to be a Word, a Netscape Navigator, or an Excel<br />

program, m<strong>in</strong>d you—just a little someth<strong>in</strong>g to help you tie <strong>in</strong> your education with some<br />

experience.<br />

The first part of this week you worked on <strong>C++</strong> language keywords and syntax. Th<strong>in</strong>gs like<br />

loops and if statements are fairly easy to comprehend. Don’t be concerned, though, if you<br />

have to go back and look up the syntax once <strong>in</strong> a while. There is a lot to learn, and you aren’t<br />

expected to be able to memorize every keyword and its syntax. Later on you will, but at this<br />

stage of the game it isn’t expected.<br />

Toward the middle of the week you were <strong>in</strong>troduced to structures and then to <strong>C++</strong> classes.<br />

Classes are the bulk of what <strong>C++</strong> is about. The th<strong>in</strong>gs we discussed on <strong>Days</strong> 1, 2, and 3 are<br />

primarily features of the <strong>C++</strong> language that come from the C language. Classes, though, are<br />

pure <strong>C++</strong>. Sometimes it takes a while for you to grasp where classes can be used <strong>in</strong> your<br />

programs. For a long time you might only deal with the classes that the VCL provides and<br />

not write any classes of your own. Later on you will probably f<strong>in</strong>d situations where a class<br />

would fit perfectly with a particular task you have to accomplish. When that time comes, you<br />

will be ready to tackle writ<strong>in</strong>g your own class. After you’ve written one or two, you will likely<br />

be off and runn<strong>in</strong>g.<br />

On Day 5 you got an <strong>in</strong>troduction to class libraries, also known as frameworks. VCL is a<br />

framework. A framework makes your life easier by encapsulat<strong>in</strong>g difficult W<strong>in</strong>dows<br />

programm<strong>in</strong>g tasks <strong>in</strong>to classes that you can deal with on a more rational level. Believe me,<br />

sometimes the raw W<strong>in</strong>dows API appears to be anyth<strong>in</strong>g but rational. VCL takes care of<br />

deal<strong>in</strong>g with those issues for you and provides you with a higher level of programm<strong>in</strong>g objects<br />

that you can easily <strong>in</strong>corporate <strong>in</strong>to your applications. No, VCL is not easy, but it is much<br />

easier than deal<strong>in</strong>g with the API that the VCL works to shield you from. As part of the<br />

discussion on frameworks, you were <strong>in</strong>troduced to the PME (properties, methods, and<br />

events) model. You learned a bit about properties, methods, and events, and how you will<br />

use them to build W<strong>in</strong>dows programs <strong>in</strong> <strong>C++</strong>Builder.<br />

At the end of this first week you were able to play around with the IDE a little. You learned<br />

about the IDE: how to customize it to your lik<strong>in</strong>g, how the Component Palette works, what<br />

the Object Inspector is for, and how to use the Menu Designer. This part of the week you<br />

got <strong>in</strong>to the fun stuff. It’s okay to use the word fun. I f<strong>in</strong>d all k<strong>in</strong>ds of programm<strong>in</strong>g a great<br />

deal of fun. That’s why I do it. Hopefully, you f<strong>in</strong>d it fun, too.<br />

F<strong>in</strong>ally, you ended the week by learn<strong>in</strong>g all about the Form Designer. The Form Designer<br />

is where the bulk of your <strong>C++</strong>Builder applications will be designed—the graphical part of the<br />

application, anyway. Work<strong>in</strong>g with the Form Designer can be fun, too. Us<strong>in</strong>g the Form<br />

Designer you can create great-look<strong>in</strong>g forms. Remember, a form represents a w<strong>in</strong>dow <strong>in</strong> your<br />

applications. Most applications have a ma<strong>in</strong> w<strong>in</strong>dow and several dialog boxes that are

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!