' Object Maker ' Copyright(c) 1997 George Girton ' All rights reserved. DECLARE SUB load () DECLARE SUB ball () DECLARE SUB square () DECLARE SUB triangle () CLS LOCATE 15, 5: PRINT "Copyright (c) 1998 George Girton" LOCATE 16, 5: PRINT "All rights reserved." FOR pause = 1 TO 50000 NEXT pause 1 CLS SCREEN 13: COLOR 5: LOCATE 2: PRINT "Object Maker" COLOR 1: LOCATE 17: PRINT "Choose:" COLOR 4: LOCATE 20: PRINT "1) Continue" PRINT "2) Exit" COLOR 15: LOCATE 23: INPUT "Press the number: ", choice1 IF choice1 = 1 THEN GOTO 2 ELSEIF choice1 = 2 THEN END ELSE GOTO 1 END IF 2 load 3 CLS LOCATE 5, 5: PRINT "Would you like to build a:" LOCATE 7, 5: PRINT "Square" LOCATE 8, 5: PRINT "Circle" LOCATE 9, 5: PRINT "Triangle" LOCATE 11, 5: INPUT "Press the capital letter: ", choice2$ IF choice2$ = "S" THEN load square ELSEIF choice2$ = "T" THEN load ball ELSEIF choice2$ = "C" THEN load triangle ELSE GOTO 3 END IF GOTO 1 SUB ball 5 CLS LOCATE 3: PRINT "You will have to enter the height " PRINT "and base when requested to. This " PRINT "information must be inputed for a " PRINT "triangle to appear." PRINT "The dimensions must be between 1 and 100" LOCATE 12: PRINT "Enter the height now:" INPUT height check$ = "Wait for varification." FOR check = 1 TO 15 LOCATE 14: PRINT check$ check$ = check$ + "." FOR pause = 1 TO 5000 NEXT pause NEXT check IF height > 100 THEN PRINT "Sorry that is too large!": FOR pause = 1 TO 50000: NEXT pause: GOTO 5 IF height < 1 THEN PRINT "Sorry that is too small!": FOR pause = 1 TO 50000: NEXT pause: GOTO 5 LOCATE 16: PRINT "Enter the base now:" INPUT width1 check$ = "Wait for varification." FOR check = 1 TO 15 LOCATE 18: PRINT check$ check$ = check$ + "." FOR pause = 1 TO 5000 NEXT pause NEXT check IF width1 > 100 THEN PRINT "Sorry that is too large!": FOR pause = 1 TO 50000: NEXT pause: GOTO 5 IF width1 < 1 THEN PRINT "Sorry that is too small!": FOR pause = 1 TO 50000: NEXT pause: GOTO 5 load CLS top = width1 / 2 LINE (1, height)-(width1, height) LINE (1, height)-(top, 1) LINE (width1, height)-(top, 1) perimeter = width1 + ((height - top) * 2) area = (height * width1) / 2 LOCATE 2, 20: PRINT "Height: "; height LOCATE 3, 20: PRINT "Base: "; width1 LOCATE 4, 20: PRINT "Perimeter: "; perimeter LOCATE 5, 20: PRINT "Area: "; area LOCATE 23: PRINT "Press C to continue" key$ = INKEY$ DO WHILE key$ <> "C" key$ = INKEY$ LOOP END SUB SUB load CLS COLOR 2 LINE (100, 50)-(200, 50) LINE (100, 50)-(100, 75) LINE (100, 75)-(200, 75) LINE (200, 50)-(200, 75) FOR counter = 101 TO 199 STEP 1 LINE (counter, 50)-(counter, 75) LOCATE 9, 14: PRINT "Loading..." FOR pause = 1 TO 2500 NEXT pause NEXT counter END SUB SUB square 4 CLS LOCATE 3: PRINT "You will have to enter the height " PRINT "and width when requested to. This " PRINT "information must be inputed for a " PRINT "rectangle or square to appear." PRINT "The dimensions must be between 1 and 100" LOCATE 12: PRINT "Enter the height now:" INPUT height check$ = "Wait for varification." FOR check = 1 TO 15 LOCATE 14: PRINT check$ check$ = check$ + "." FOR pause = 1 TO 5000 NEXT pause NEXT check IF height > 100 THEN PRINT "Sorry that is too large!": FOR pause = 1 TO 50000: NEXT pause: GOTO 4 IF height < 1 THEN PRINT "Sorry that is too small!": FOR pause = 1 TO 50000: NEXT pause: GOTO 4 LOCATE 16: PRINT "Enter the width now:" INPUT width1 check$ = "Wait for varification." FOR check = 1 TO 15 LOCATE 18: PRINT check$ check$ = check$ + "." FOR pause = 1 TO 5000 NEXT pause NEXT check IF width1 > 100 THEN PRINT "Sorry that is too large!": FOR pause = 1 TO 50000: NEXT pause: GOTO 4 IF width1 < 1 THEN PRINT "Sorry that is too small!": FOR pause = 1 TO 50000: NEXT pause: GOTO 4 load CLS LINE (1, 1)-(width1, 1) LINE (width1, 1)-(width1, height) LINE (1, height)-(width1, height) LINE (1, 1)-(1, height) perimeter = 2 * (height + width1) area = height * width1 LOCATE 2, 20: PRINT "Height: "; height LOCATE 3, 20: PRINT "Width: "; width1 LOCATE 4, 20: PRINT "Perimeter: "; perimeter LOCATE 5, 20: PRINT "Area: "; area LOCATE 23: PRINT "Press C to continue" key$ = INKEY$ DO WHILE key$ <> "C" key$ = INKEY$ LOOP END SUB SUB triangle 6 CLS LOCATE 3: PRINT "You will have to enter the radius " PRINT "when requested to. This information must be " PRINT "inputed for a triangle to appear." PRINT "The dimensions must be between 1 and 100" LOCATE 11: PRINT "Enter the radius now:" INPUT height check$ = "Wait for varification." FOR check = 1 TO 15 LOCATE 14: PRINT check$ check$ = check$ + "." FOR pause = 1 TO 5000 NEXT pause NEXT check IF height > 100 THEN PRINT "Sorry that is too large!": FOR pause = 1 TO 50000: NEXT pause: GOTO 6 IF height < 1 THEN PRINT "Sorry that is too small!": FOR pause = 1 TO 50000: NEXT pause: GOTO 6 load CLS CIRCLE (height, height), height per = 2 * 3.14 * height ar = 3.14 * height ^ 2 LOCATE 2, 20: PRINT "Height: "; height LOCATE 3, 20: PRINT "Circ.: "; per LOCATE 4, 20: PRINT "Area: "; ar LOCATE 23: PRINT "Press C to continue" key$ = INKEY$ DO WHILE key$ <> "C" key$ = INKEY$ LOOP END SUB