Introduction to Programming


Lesson Plans & Calendars

September October November December January
February March April May June

Check Test Scores    
Back to Computer Science Home Page


Course description

The languages presented in this course, MS-DOS QBasic and Visual Basic are well-structured languages used on IBM PCs or PC-compatibles. Structured problem solving is emphasized throughout this course, and problem solutions are functionally decomposed with the aid of structure charts. Each programming chapter in the text ends with a comprehensive programming problem that ties together new statements and concepts. This comprehensive problem is developed using top-down design and is modularized with the aid of a structure chart. Short answer 'Learning Check' problems will be assigned after a topic is covered. Upon concluding a chapter the student will be assigned programming problems which require implementing the skills learned both in the current and in earlier chapters. The program will constitute 50% of the chapter grade. Upon completion of the programming assignment and review of the chapter questions a chapter test will be given. It will constitute 50% of the chapter grade.

The final quarter of the Programming 2 course will be devoted to the development of a final programming project. Students will form development groups of 3 or 4 and follow the prototype method to produce a software package to meet the needs and specifications set forth by the end user. The grade for the fourth quarter will be the average of all deliverable items ranging from design specifications to final software product and user manuals.

The quarterly grades will be the average of the chapter grades completed during the 10 week quarters. The grade for Programming 1 will consist of 40% quarter1 +40% quarter 2 and 20% of the Final Exam. The grade for Programming 2 will consist of 40% quarter3 + 40% quarter 4 and 20% of the Final Exam. Students may choose to take Programming 1 and not Programming 2.

The topics covered and the objectives for each chapter are listed below.

Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6
Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Final Project

Back to Computer Science Home Page


Chapter One Outline

Objectives
After studying this chapter, the Students will be able to:

  1. List the three kinds of tasks a computer can perform.
  2. Name the three features that make a computer useful.
  3. Explain the purpose of the central processing unit and discuss its three components.
  4. Discuss the different input, output, and secondary storage devices used with computer systems.
  5. Explain the purpose of the computer's operating system.
  6. Access QBasic and identify the different parts of the QBasic screen.
  7. Explain how to select commands from the QBasic menu bar.
  8. Enter a simple program, store it on disk, and load it back into the computer's main memory.
  9. Edit program statements.

Back to the top


Chapter Two Outline

Objectives
After studying this chapter, the Students will be able to:

  1. Describe the three levels of programming languages.
  2. Discuss why structured programming was first developed.
  3. Explain why structured programs are divided into modules.
  4. Discuss the history of the BASIC language.
  5. List the four steps used in problem solving.
  6. Determine the needed input and output for simple programming problems.
  7. Define the term algorithm and develop algorithms for problem solutions.
  8. List the three basic logic structures.
  9. Draw structure charts for simple programming problem solutions.
  10. Define top-down design and give three advantages of using top-down design.
  11. Define flowchart and pseudocode.
  12. List and explain the purpose of the five flowcharting symbols discussed in this chapter.
  13. Explain how the three basic logic structures are represented in flowcharts.

Back to the top


Chapter Three Outline

Objectives
After studying this chapter, the Students will be able to:

  1. Differentiate between numeric and character string constants and give examples of each.
  2. Use numeric and character string constants correctly in programs.
  3. Explain how variables are used to store values in the computer's main memory.
  4. List the rules for naming variables.
  5. Define the term keyword.
  6. Correctly document programs.
  7. Assign values to variables.
  8. Perform arithmetic operations using both constants and variables.
  9. Evaluate arithmetic expressions according to the hierarchy of operations.
  10. Display program output on the monitor screen.
  11. Use the Immediate window to. execute statements in immediate mode.
  12. Use the various forms of help available with QBasic.

Back to the top


Chapter Four Outline

Objectives
After studying this chapter, the Student will be able to:

  1. Use the INPUT statement to allow data to be entered during program execution.
  2. Use the READ and DATA statements to enter data into programs.
  3. Explain the advantages and disadvantages of each of these methods of entering data.
  4. Write programs so that the output is formatted in a readable way.
  5. Use commas and semicolons to format program output.
  6. Use the TAB and SPC functions to format output.
  7. Explain how the PRINT USING statement works and use it in programs when appropriate.

Back to the top


Chapter Five Outline

Objectives
After studying this chapter, the Student will be able to:

  1. Define the term control structures.
  2. Use block IF statements to create decision structures.
  3. Explain the difference between single-alternative and double alternative decision structures.
  4. Explain the meaning of the relational operators and use relational operators in expressions.
  5. Define the term collating sequence.
  6. Use the SELECT CASE statement in programs.
  7. Write programs using menus.
  8. Use the logical operators NOT, AND, and OR to check for specific conditions.

Back to the top


Chapter Six Outline

Objectives
After studying this chapter, the Student will be able to:

  1. Write programs that use SUB procedures.
  2. Use structure charts to determine how programs should be modularized.
  3. Correctly pass arguments in CALL statements to their corresponding parameters in SUB procedures.
  4. Identify and explain the purpose of local variables.
  5. Use stubs in developing programs.
  6. Pass arguments either by reference or by value.
  7. List several advantages of modularizing programs.
  8. Use the Edit menu to move or copy portions of a program from one location to another.

Back to the top


Chapter Seven Outline

Objectives
After studying this chapter, the Student will be able to:

  1. Explain the importance of loop structures.
  2. List the elements of a loop.
  3. Write programs using the DO WHILE LOOP and the DO UNTIL ... LOOR
  4. Use trailer values to control loops.
  5. Write counting loops.
  6. Use the FOR ... NEXT loop appropriately in programs.
  7. Create nested loops.
  8. Determine which type of loop is appropriate in a particular programming situation.

Back to the top


Chapter Eight Outline

Objectives
After studying this chapter, the Student will be able to:

  1. Use the standard numeric functions INT, SQR, SGN, ABS, and RND.
  2. Use the standard string functions LEN, LEFT$, RIGHT$, MID$, LCASE$, UCASE$, ASC,
  3. CHR$, VAL, STR$, and DATE$.
  4. Use FUNCTION procedures to meet specific needs.
  5. Define the term user-friendly.
  6. Write user-friendly programs.
  7. Protect programs from invalid user input.
  8. Explain the difference between syntax and logic errors.
  9. Use desk checking and program tracing to locate errors.
  10. Test programs using correctly selected data.

Back to the top


Chapter Nine Outline

Objectives
After studying this chapter, the Student will be able to:

  1. Explain the purpose of subscripts.
  2. Use the DIM statement to dimension arrays.
  3. Read data to, print, and manipulate one- and two-dimensional arrays.
  4. Sort arrays using the bubble sort.
  5. Use the merge sort to merge two sorted arrays.
  6. Search for data items in an array using both the sequential and binary searches.

Back to the top


Chapter Ten Outline

Objectives
After studying this chapter, the Student will be able to:

  1. Use the DIM statement to specify the data type of variables.
  2. Define records and explain how records are different from arrays.
  3. Use records in programs.
  4. List several advantages of using data files.
  5. Discuss the relationship between files, records, and fields.
  6. Create a sequential file.
  7. Read from and write to a sequential file.
  8. Append data to the end of an existing sequential file.
  9. Create random files and define records to be used in them.
  10. Access records in a random file.
  11. Add records to a random file.
  12. Compare random and sequential files.

Back to the top


Chapter Eleven Outline

Objectives
After studying this chapter, the Student will be able to:

  1. Define text mode and graphics mode.
  2. Explain how a system's graphics adapter is related to the graphics screen modes that can be used with that machine.
  3. Create graphics images using the SCREEN, LOCATE, PSET, PRESET, DRAW, LINE, CIRCLE, and COLOR statements.
  4. Create bar charts to illustrate program output.
  5. Create sound using the BEEP and SOUND statements.
  6. Create music using the PLAY statement.

Back to the top


Final Programming Project

In the final quarter of the Introduction to Programming class we devote time to developing a software solution to a problem. The problems are selected from faculty members, secretarial and custodial staff or other students. The class is organized as a corporation and broken down into programming groups of three to four students. Each group selects a programming problem from a list advertised on the network. The group then follows the prototyping model of software development outlined below.

 

  1. groups agree on the problem to be solved and on the requirements;
  2. complete and document* preliminary interviews with the customer;
  3. agree on project plans, including resource and time constraints;
  4. present project plans to the user and refine the plans according to customer input;*
  5. Produce design document 1* and agree on deadlines ;
  6. produce and test the first prototype;*
  7. begin to produce user documentation (users' manual);*
  8. evaluate the prototype and demonstrate it to the user ;
  9. document revisions and updates to be completed in the second prototype*
  10. Produce the second prototype;*
  11. update documentation & users manual;
  12. evaluate the second prototype and demonstrate it to the user ;
  13. if necessary, refine and test a third prototype;
  14. finish the users manual;*
  15. create a testing plan* and test the final product;
  16. obtain the users final approval and sign-off.*

    (* represents a deliverable object to be submitted for evaluation)

 

Every group will share their progress with the entire class by presenting their work at regular intervals. These presentations called walk-throughs will be used prior to submission of any deliverable item. These enhance the capabilities of every group because they improve the quality of work, highlight errors early on in development, and result in the cross-education of team members in all the applications being developed. Also, application expertise is communicated, much work is simplified, and technical progress is readily assessed.

A major deliverable from this process is the original design specification suitable for use in program's development. Beginning programmers usually fail to plan properly before they begin to write code. Emphasizing the design specification forces students to properly devote an adequate amount of time to the planning phase so that writing the code becomes more organized and efficient.

The evaluation or acceptance stage is the formal review of each prototype and documentation of the lessons learned. It is a simple matter to demonstrate the prototype. But these evaluations are not a one-way process. The most vital element in the whole prototyping approach is obtaining and exploiting customer feedback. It is very important that students recognize the need and plan for enough time to review the prototype properly both among the programming group and in walk throughs with other groups. The reviews also allow the project customer, the teacher and the programmers to agree that the deliverables have been produced according to the outline requirements definition and time planning documentation.

After each prototype is accepted a decision is made as to how the programming effort will proceed. The design document is then updated and new programming code is generated to produce the next prototype. This process is repeated until the programmers and customer agree that the project is finished. The exact number of prototypes necessary is not known until the project is completed. Students find that a number of questions arise, such as how a team can control endless prototyping. There may be the fear that users will get carried away, constantly changing their minds, opening up the prospect of an endless, uncontrolled development cycle. The groups of student programmers must make prudent decisions concerning time constraints and feasibility factors if the project is to be delivered on time and within the constraints set forth in the original design.

Finally, once the product is finished it must be placed into service. The public installation on the network, publication of a users manual and tidying up of any loose ends, such as exception handling rules and routines must all be completed before the software is considered to be in service. The project is considered complete only by mutual agreement of the customer, teacher and programming group. Once this is established the requirements list can be signed off and a final grade for the project is assigned.

 

Typical project milestones might include the following:

Experience with teaching the prototyping method described suggests small teams of three or four at the most work best. There is no specialization within the team. All members have completed the course of study in Qbasic and Visual Basic but they are not systems analysts or experienced programmers at this point. They are system builders expected to develop all the skills of building the system from start to finish. They quickly realize that learning doesn't end simply because they have finished formal classroom training in this subject. Students will find that they will learn many skills related to programming and the human interaction of a workplace that could not possibly be covered in a formal classroom setting .

Back to the top


Text Books

QBasic, Baumann - Mandell. 1992. West Publishing Company.

Visual Basic 4.0 Step by Step, 1995. Microsoft Press.


Revised: September 11, 2002.