Get premium membership and access revision papers, questions with answers as well as video lessons.

Bbm 205: Introduction To Programming Ii Question Paper

Bbm 205: Introduction To Programming Ii 

Course:Bachelor Of Business Management

Institution: Moi University question papers

Exam Year:2010



BBM 205: INTRODUCTION TO PROGRAMMING II

Answer question one and any other two questions

QUESTION ONE
Write a program to provide the weather reporter with a list of major cities with their high temperatures for the day. The program should arrange the cities in alphabetical order using a bubble sort. It should also allow the weather reporter to make a request of a city and have the high temperature for the city printed. Use a binary search for finding the requested city. The data below may be used in this program. (30mks)

Mombasa 92
Nairobi 80
Chuka 86
Kisumu 78
Kakamega 83
Lumakanda 95
Bosongo 73
Fangano 85

QUESTION TWO
Write a program to create a sequential file named STUD and then store in it student records that have the student number, student name, student major, and year of study. The program should allow the operator to enter as many records as needed. (20mks)

QUESTION THREE
In the streams of Mau there are four types of trout. For each type, a daily limit has been designated as follows:

Brookie 8
Brown 4
Rainbow 6
Cuttroat 5

Using the ON/GOSUB statement, write a program that allows program execution to branch to a subroutine that will print the limit for each type of trout entered by the user. (20mks)

QUESTION FOUR
Write a program using a random file access method to create a file that will keep track of items for sales at the Student Centre Store. Each record in the file should contain the inventory number, the name of the item, and the quantity of that item on hand. The program should proceed to accept records, allowing the user to make as many entries as possible. (20mks)






More Question Papers


Popular Exams



Return to Question Papers