Wednesday, March 5, 2008

Assignment 4

Assignment A4: Arrays (Duration: 2 practical periods)

MyZan Departmental Store is planning to have a mega sale in the whole month of August as one of the activities to celebrate Malaysia’s 50 years of independence. The management of the store has decided to give a discount of 20% for all products sold throughout the store.

Write a program in C to read an initial price, then generate series of nine prices with incremental value of Ringgit Malaysia 10.00. The discounted prices are calculated based on the initial and generated prices. Display the prices and their corresponding discounted prices as in the figure below.

Tuesday, March 4, 2008

Assignment 3

Assignment A3: Functions (Duration: 2 practical periods)

Travel Distance Calculator computes travelling time, petrol consumption and total petrol cost from a departure city to a destination city.

Write a function travelDistanceCalculator that accepts travel distance, average speed in kilometre per hour, petrol consumption in kilometre per litre, petrol cost in Ringgit Malaysia per litre and displays travel distance, travelling time, total petrol consumption and total petrol cost.

Write a program in C that reads travel distance between two cities, petrol consumption in kilometre per litre, petrol cost in Ringgit Malaysia per litre and average speed in kilometre per hour, and calls function travelDistanceCalculator. The user interface screen may appear as in the figure below.





You must construct a pseudocode or flowchart before writing the program.

Monday, March 3, 2008

Assignment 2

Assignment A2: Control Loop Statements (Duration: 2 practical periods)

Write a program in C that reads any five digit number and displays the number in two parts diagonally as shown in the user interface screen as in the figure below.


The number displayed is separated into two parts beginning with the rightmost unit digit. The process continues until the leftmost digit is reached.

You must construct a pseudocode or flowchart before writing the program.

Assignment 1

Assignment A1: Conditional Statements (Duration: 2 practical periods)

The owner of FIZI restaurant distributes brochures to his customers informing discounts offered on selected menu for the month of April. To be eligible for the discount, a customer must order any three items of the menu. The discount for each item in the menu is shown in the table below.

The restaurant owner has requested you to write a program in C that reads the three ordered items and their normal prices. The program calculates the total amount to be billed to the customer based on the discount given for each item.

You must construct a pseudocode or flowchart before writing the program.

Syllabus Computing

Information and Communication Technology
1.1 Development of Information Technology
1.2 Computer Technology
1.3 Communication Technology
1.4 Information Technology Application
1.5 Security and Privacy
1.6 Information Technology Ethics and Isseus

Information System Development
2.1 Introduction to Systems Analysis and Design
2.2 Planning Phase
2.3 Analysis Phase
2.4 Design Phase
2.5 Implementation Phase
2.6 Maintenance Phase
2.7 Introduction to Database
2.8 Basic Concept of Database
2.9 Planning and Design of Database System
2.10 Query Language
2.11 Implementation of Database Application System

Multimedia
3.1 Multimedia Evolution
3.2 Multimedia Technology
3.3 Multimedia Page
3.4 Multimedia in Network
3.5 Multimedia Development

Programming
4.1 Steps of Problem Solving
4.2 Algorithm Construction
4.3 Standard Algorithms
4.4 Basic Data Type
4.5 Evolution of Programming Languages
4.6 Programming Concepts of C Languages
4.7 Declaration
4.8 Operators
4.9 C Language Statements
4.10 Functions
4.11 Data Structure Statements
4.12 File Operation of Type ASCII?Text
4.13 Problem Solving with C Language