BILKENT UNIVERSITY
DEPARTMENT OF COMPUTER TECHNOLOGY AND PROGRAMMING
FALL 1996-1997

CTP 108
COMPUTER PROGRAMMING FOR BUSINESS
LAB GUIDE 2
Week 4


1.Write a program to do the following :

The program should input a set of records related to book titles from the screen-keyboard and store all input records into a sequential file. The format of the output sequential file should be:


 Book-Number:	4 numeric characters.
 Book-Title : 	20 alphanumeric characters.
 Book-Author:	15 alphanumeric characters.
 Publisher:   	12 alphanumeric characters.
 Subject:	15 alphanumeric characters.
 
The program should read book-titles until the user indicates that he/she does not want to add any more records. You can use the following set of data to test your program :
 BOOK#	    TITLE		 AUTHOR		PUBLISHER		SUBJECT  
 ======	    =========        	 ========	=========	       ===========
1235	    BABA		MARIO PUZO	E  YAYINLAR		FICTION
1236	    HTML FOR FUN	MARRY MORIS	PRENTICE		HALL  COMPUTERS
2678	    FABRIGA		ATILA ATALAY	E YAYINLARI		HUMOR
2345	    INTR. TO COBOL	BARRY NEWMAN	O’REILLY		COMPUTERS	      	
4300	    FLIGHT INS.		TERENCE WALL	ABC PUB.		AVIATION
2346	    INTR. TO PASCAL	HERMAN WHITE	PRENTICE		HALL COMPUTERS
4367	    INSTRUMENT FLIGHT	STUART TRACY	PRENTICE		HALL AVIATION
3456	    INTR. TO C	        MICHEAL JORDAN  ABC PUB.		COMPUTERS
3890	    KARA KITAP	        ORHAN PAMUK	F YAYINLARI         	FICTION
0023	    WIN SIZDEN KORKSUN  LALE KUYUCU	PUSULA	       		COMPUTERS
0024	    KIM KORKAR UNIXTEN  UGUR AYFER	PUSULA	       		COMPUTERS
2. Write a second program which prompts the user for a "SUBJECT" and searches the sequential file created by the first program for all matching records. All information related to matching books should be displayed on the screen with proper captions and transferred BOOK NUMBER, PUBLISHER, SUBJECT to a second line sequential file. An output on the screen might look like :
 BOOK#	    TITLE		AUTHOR		PUBLISHER		SUBJECT  
 ======	    =========           ========	=========	       ===========
1236	    HTML FOR FUN	MARRY MORIS	PRENTICE		HALL  COMPUTERS
2346	    INTR. TO PASCAL	HERMAN WHITE	PRENTICE		HALL  COMPUTERS
Back to first page...