UNIHIVE

Study Hub UNIPORT CSC 180.1

CSC 180.1 · Introduction to Computer Science and BASIC Programming

Programming strategy and computer applications

The steps of solving a problem with a computer, testing and debugging, documentation, and where computers are used.

Our notes

2 min read

Steps in programming (the program development cycle)

  1. Define the problem: what are the inputs, outputs and rules?
  2. Analyse and design: plan the method; write an algorithm, flowchart or pseudocode.
  3. Code: write the program in a language (BASIC).
  4. Test and debug: run with test data whose answers you know; fix syntax, run-time and logic errors.
  5. Document: comments (REM lines), a user guide, and a description of the method.
  6. Maintain: correct and improve the program as needs change.

Choosing test data

  • Normal data: typical values (a score of 65).
  • Boundary data: edges of ranges (49, 50, 70).
  • Wrong data: values that should be rejected (−5, 120, letters).

A program is only trusted when it gives correct results for all three.

Worked example

A grading program uses "IF S > 70 THEN A". Testing S = 70 shows it gives B, not A: a boundary error. The fix is S >= 70.

Good programming practice

  • Meaningful names (TOTAL, not T9).
  • Comments explaining each section.
  • Indentation inside loops and decisions.
  • One task per subroutine.
  • Avoid unnecessary GOTOs; use structured loops.
  • Check input (reject impossible values).

Applications of computers

AreaExamples
Educatione-learning, computer-based tests (JAMB UTME), school records, result processing
Banking and commerceATMs, POS terminals, mobile banking, online shopping
Healthpatient records, diagnosis equipment, scans
Engineering and sciencedesign (CAD), simulation, weather forecasting, research
Governmentelections (voter registration and accreditation), national identity numbers, tax
Communication and mediaemail, social media, publishing, broadcasting
Industryrobots, process control, stock control
Hospitality and tourismhotel reservations, booking systems, point-of-sale
Agricultureweather and soil data, farm records, market prices

Effects of computers on society

Positive: speed, accuracy, new jobs and skills, easier communication. Negative: job loss in some routine work, cybercrime and fraud, privacy risks, addiction, health effects of long screen use.

Exams usually ask

  • State and explain the stages of program development.
  • What is debugging? Name the kinds of errors and how to find them.
  • Discuss the applications of computers in any three areas of Nigerian life.

Common mistake

Starting to type code before planning. A few minutes on an algorithm or flowchart saves hours of debugging.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All CSC 180.1 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.