1.1 Computer Systems
Computers are made up of a combination of devices, with each component carrying out different tasks. The term "hardware" refers to the physical components inside the computer tower.
Hardware:
1) The central processing unit (CPU) is basically the brain of the computer. Without a CPU, a computer would not function/be able to run any software (OS and application software).
2) The main memory of the computer is RAM (random-access memory). This is the memory where everything you're doing at a given moment on the computer is stored as a short-term position for the CPU to easily access it whenever it needs to. Anything stored here is erased when the computer is shut off, so make sure to save whatever you're working on. More RAM=a more efficient (faster) computer.
3) Secondary storage refers to any solid-state, disk-drive, USB flash drive, or any sort of medium like CDs/DVDs that can be used to store data.
4) Input devices can be any device where data is being sent to the computer through an outside world input. A keyboard, mouse, scanner, etc can be considered an input device.
5) Output devices are anything a computer sends to the outside world such as a printer, monitor, and disk drives.
Software:
Operating Systems: Without an Operating System, a computer would not know what to do. All the components may be present, but without an OS, none of these devices have any instructions and none of the processes would be executed.
Application Software: Any application that a user interacts with. Word processing, spreadsheets, powerpoint, video games, etc are all application software.
1.2 Programs/Programming Languages
Key Terms:
-A program consists of specific instructions that enables a computer to perform a task.
-An algorithm is a set of well-defined steps for performing a task. These are specific, sequentially ordered tasks that the computer follows.
-A compiler turns programming languages(C#, C++, VB, etc) statements into machine code.
-Keywords are specific words/reserved words that make up programming languages.
-Operators are like keywords in that they are specific characters that perform operations on data (ex. a + sign is an operator).
-A variable is a storage location in memory that is represented by a name. It's name (a single word) indicates what it is used for, but we'll learn more about this in later chapters.
-Each programming language has its own set of rules that must be strictly followed. This set of rules is known as syntax.
-Statements are the individual instructions that a programmer writes when coding a program.
-Procedures are the sets of programming statements for the purpose of performing a task. The program executes the procedure when the task is needed.
-An object is essentially any "thing" that has data and can perform operations. The data is known as properties/attributes and the operations an object can perform is known as its methods.
-A control is a specific type of object that appears in a program's GUI (graphical user interface). Elements in the GUI, such as a label or a textbox, are controls.
-Properties are pieces of data that defines the characteristics of the controls.
Event-Driven Programming: Basically, any sort of program that a user can interact with requires some sort of "action" to make it run. Clicking a button is an event. You must code event handlers to tell the program what to do in case of events, or else clicking a button would give no results.
Programming Languages: Computers are able to process whatever instructions we give it through it's own language, known as "machine language instructions". This is what is called binary code, which is made up of 1s and 0s. Different programming languages, such as C++ and Visual Basic, make it easier for humans to write programs. Once the code is finished, a "compiler" turns that code into binary code for the computer to read.
1.3 More About Controls
This section mainly goes over what we just covered about controls, but gives detailed descriptions for everything as well as showing visuals to help in understanding. It also delves further into the topic of controls, naming them being the most prominent. Control names should be changed to indicate what they are when they are an active part in the application's event handlers. The book used the examples of "txtPayRate" to label the control that allows the user to enter their hourly pay rate in the Wage Calculator program.
1.4 The Programming Process
The most important aspect when thinking of a program is figuring out what you want it to do. Find out the purpose, input, process, and the output of the program before trying to code. Without proper planning, you'll run into problems you could have avoided if you had planned ahead.
Drawing a mock sketch or even drawing a flowchart of events will also help you further visualize your program. Pseudocode is a way of jotting down initial code that is mostly english before you start writing the programming code. Once you've written the code, check for any errors (runtime and statement errors).
1.5 Visual Basic
Visual Studio is a pretty awesome program. It can do quite a bit and this section initially starts breaking down all the tools and features. The toolbar contains prety much everything you need to write a program. The solution explorer and the properties window are both present at any time to the right when you're working on a program. The solution explorer window displays any project you're working on, including the current one. The properties window is used to examine any control properties. It would be way too tedius and my post would end up being way too long if I detailed every aspect about this program, but all of you get the gist of it from reading the chapter.
No comments:
Post a Comment