---------------------------------------------------------------------------- COP 3610 -- FINAL EXAM -- 80 POINTS MAX M. Schmalz 001214 ---------------------------------------------------------------------------- *** YOU MAY USE THREE TWO-SIDED 8-1/2" x 11" CRIB SHEETS FOR THIS EXAM *** *** ALL OTHER BOOKS AND NOTES MUST BE PUT AWAY *** *** ANSWER ALL QUESTIONS - NO PENALTY FOR GUESSING *** 1) SIT IN THE SEAT THAT CORRESPONDS TO THE FOLLOWING NUMBER: EXAM NUMBER: _______________ 2) PUT YOUR NAME AND SSN ON ALL PAGES OF THE EXAM. 3) PLEASE SIGN THE FOLLOWING STATEMENT: I have not received any help on this exam, other than the instructor answering my requests for clarification, and the crib sheet that was permitted for the exam. I did not share information about the exam with any other person during the course of the exam. NAME:_______________________________________ SSN: _______________________ PAGE PENALTIES: 1 2 3 4 5 TOTAL _____ _____ _____ _____ _____ ======= (80 MAX) ---------------------------------------------------------------------------- COP 3610 -- FINAL EXAM -- 80 POINTS MAX M. Schmalz page 1/5 ---------------------------------------------------------------------------- NAME:_______________________________________ SSN: _______________________ ANSWER EACH QUESTION WITH THE "BEST" ANSWER. PUT ANSWERS IN BLANKS. NOTE: More than one answer may be true. Choose carefully. 4pts 1) List four services that the UNIX operating system provides to users, which were also provided by operating systems that existed before MULTICS. Also list the operating system name next to the service. (Example: "Spooling - IBM System/360") #1:___________________________ #2:_______________________________ #3:___________________________ #4:_______________________________ 6pts 2) What are three advantages of Time Sharing as opposed to Batch Processing - Explain each answer #1: ______________________________________________________________ ______________________________________________________________ #2: ______________________________________________________________ ______________________________________________________________ #3: ______________________________________________________________ ______________________________________________________________ ---------------------------------------------------------------------------- COP 3610 -- FINAL EXAM -- 80 POINTS MAX M. Schmalz page 2/5 ---------------------------------------------------------------------------- NAME:_______________________________________ SSN: _______________________ 6pts 3) Short answers about two *different* topics: a) What are regular expressions, and why are they used in UNIX? ______________________________________________________________ ______________________________________________________________ b) Give an example of how a socket works in the context of full duplex communication. DO NOT WRITE C or UNIX CODE! ______ 4) A compiler 1pts a) organizes your hard disk b) compiles lists c) translates source code into object code d) runs machine code e) interprets source code for a runtime module f) runs in real time 3pts 5) Describe how makefile variables, directives, and rules are used in UNIX. IMPORTANT NOTE: PLEASE DO NOT WRITE YOUR ANSWER IN TERMS OF UNIX CODE. USE ENGLISH ONLY. Varbls: __________________________________________________________ Dirctv: __________________________________________________________ Rules: __________________________________________________________ 5pts 6) What are two limitations of the Perl language, and why are they important in modern UNIX practice? ---------------------------------------------------------------------------- COP 3610 -- FINAL EXAM -- 80 POINTS MAX M. Schmalz page 3/5 ---------------------------------------------------------------------------- NAME:_______________________________________ SSN: _______________________ 6pts 7) List one advantage (AD) and two disadvantages (DA) of the Java language: AD1: ____________________________________________________________ DA1: ____________________________________________________________ DA2: ____________________________________________________________ 4pts 8) What does each of the following commands do? (Consider each step) more money | mail -s payola gwb@pres.gov 1) ___________________________ 2) ___________________________ grep cat food ; talk yechhh 1) ___________________________ 2) ___________________________ 8pts 9) Give a nontrivial example of the command line used to a) compile a C++ program called "sweet.java.cpp" into an object file called "cow.orker" b) List all files whose names start with "I", then have one characters not equal to "a" or "m", and end with "b" or "c" followed by "." and "o" followed by "red" or "rad". 4pts 10) How would you rewrite the command in 9b) to show those files one at a time? You don't need to write UNIX code - you can use pseudocode. (Hint: Control structures) ---------------------------------------------------------------------------- COP 3610 -- FINAL EXAM -- 80 POINTS MAX M. Schmalz page 4/5 ---------------------------------------------------------------------------- NAME:_______________________________________ SSN: _______________________ 9pts 11) Match the letters with the UNIX commands or constructs: ______ more more a) Java-C++ metacompiler b) Java debugger ______ perl c) invokes Java-C++ linker d) Java runtime module ______ time e) text processing language f) text editor ______ javad g) Perl compiler for Solaris h) email handler ______ mail i) show elapsed time data j) snail mail ______ javac k) performance measurement l) link object files ______ perf m) send messages over Internet n) show file pagewise ______ jcc o) object code profiling p) Java compiler ______ vi q) illegal UNIX command r) none of above ______ 12) What are shell scripts used for in UNIX? 3pts a) format text by rearranging symbols and variables b) accepting only those filenames that have scripted syntax c) constraining the functionality of a UNIX program or command d) supporting custom functions or operations for each user e) none of the above 6pts 13) List three advantages and three disadvantages of the C++ language: ADVANTAGE DISADVANTAGE #1 ________________________ _____________________________ #2 ________________________ _____________________________ #3 ________________________ _____________________________ 6pts 14) What is object-oriented programming, and why is it important in modern software engineering practice? ---------------------------------------------------------------------------- COP 3610 -- FINAL EXAM -- 80 POINTS MAX M. Schmalz page 5/5 ---------------------------------------------------------------------------- NAME:_______________________________________ SSN: _______________________ Given the following UNIX response to the "ls" command, answer each of the questions below, ASSUMING THAT EACH LISTED COMMAND IS INDEP- ENDENT OF THE OTHER COMMANDS. If an erroneous command, state that. Beanybebe.html Polluted.html Cd2kj2747.html Taired23.txt America.txt Galloping.htm Cf2kp0337.htm Dubyaman22.txtl Amerika.tx2 Galasales.htm Cddkp2347.htm Tubbymon22.txtil 3pts 15) What filenames displayed for: ls -l C*[^24].\7.*t* ===> _________________________________ 3pts 16) What filename(s) displayed for: ls *ub[^y]*m[ao].[2]^2.tx* => _________________________________ _________________________________ _________________________________ 3pts 17) In a makefile, you have source code files "p", "q", and "r" that you want to compile into object code file "s". Show three ways to do this in a makefile and explain what each answer does if implemented. #1: #2: #3: -EOF-