MATH 206 Final, Fall 1995
American University of Beirut · Computers and Programming for Arts · 3 pages
More MATH 206 files
Show the text of this final exam
eee enone
AMERICAN UNIVERSI7 ¥
“LIBRARY
, OF HEINE
if =
Feb, 14,1996
MATHEMATICS 206
FINAL EXAM
(FALL 1995-96)
WORDPROCESSOR
(20%) a- Define the following terms wordprocessor, write, ruler.
b- How many options are there i in the menu bar of the write
software ? and cite them. .
c- Write down the process (& commands) one 3 should use to apply
the following modifications to a ‘text:
. Change the style of a paragraph: - .
. Move one paragraph from one place to ‘another.
. Search for a word and replace it by. another.
. Center the title of the text. :
. Select a paragraph of the text-and count how many words is it
composed of.
. Set the left margin to five and right margin. to 65.
. Save the document under the nameé "abe".
. Open a new document.
a
tl. DATABASE
(10%) a-Suppose you are working in a. computer ‘Company as a
consultant and you are asked to lead a project in the
computerization of a particular firm . What are the different
stages the project should pass' through and describe in few
lines each stage.
’ tll BASIC: “ se,
(10%) 1) a. What is the output of the following programs-?, (Explain)
10 X$ = = 1“
20 T=1
30 FORi=1TO 26
40 READ Y$
50 T =T+i
60 IF Y$ = X$ THEN GOTO 80°
70 NEXT I
80 N=i
90 RESTORE
100 FORI=1 TON
110 PRINT TAB(T); ~
120 READ Y$ so
130 FORJ=1 TOI _o
140 PRINT Y$;
150 NEXT J
160 PRINT
170 T=T-I
180 NEXT I
190 DATAF,H,C,L,A,M,N,P,0
b. Assume you have the following list in’ an array 44,55,12,42,94,18
(10%) 10L=2
20R=6
30K=6
40 FOR J= RTO L STEP-1 ;
50 IF A(J-1)> A(J) THEN SWP Als: 4), Ad): K=J
60 NEXT J
70 FORM=1TO6
80 PRINT A(M);
90 NEXT M
100 PRINT
110L=K+14
120 FORJ=LTOR
130 IF A(J-1)> A(J) THEN SWAP Alde A )s Als): Ke J
140 NEXT J
150 R=K-1
160 PRINT
170 IF L<= R THEN GOTO 120
180 FORJ =1TO6
190 PRINT A(J)
200 NEXT J
(20%) 2) Four hourly workers are working for a Certain company. The . ¥
workers are numbered form 1 to 4. Write a program that enters for each worker
the number of hours worked on each day of a i given week (Monday to Sunday)
and outputs the following:
i) the total number of hours worked by each worker throughout the
week.
ii) the total number of hours worked py all workers on each day of
the week.
iii) the number of the worker with the maximum number of hours.
iv) the total hours worked by ail the. workers throughout the week.
(10%) 3) Write a program to fill an array with numbers and print out all
numbers between the highest number and the lowest one.
EX: lf your input is 2,5,7,6,1 9,14,2;4 7
your output should be 19,1 4,2,1
” oa
(20%) 4.) Write a program to fill an N X Nvarray with numbers as
follows:(without using any read or input statement)