49 Pages

Cwk-03

Course: CS 2130, Fall 2009
School: East Los Angeles College
Rating:
 
 
 
 
 

Word Count: 1499

Document Preview

%#######X##########################"##T##"##T###T#####T#####T#####b# 7#########################q## ########c##### #####w# ###U#############$#x#######%## ##%<####%w#*##% #####T########% ####%T#/##% #### %####%# ##% ####%####%)####% ####% ####% ####CS2130 Programming Language Concepts and ParadigmsCoursework 2003The coursework assignment contributes 25% to the overall assessment of the...

Register Now

Unformatted Document Excerpt

Coursehero >> California >> East Los Angeles College >> CS 2130

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
%#######X##########################"##T##"##T###T#####T#####T#####b# 7#########################q## ########c##### #####w# ###U#############$#x#######%## ##%<####%w#*##% #####T########% ####%T#/##% #### %####%# ##% ####%####%)####% ####% ####% ####CS2130 Programming Language Concepts and ParadigmsCoursework 2003The coursework assignment contributes 25% to the overall assessment of the module.Modify the TimeDisplay task in the Ada program Timing from hand-out for unit 12 to display the current time of day (but not the date) at a specified position on the screen.Develop a second Ada task CountDown to provide a seconds countdown display at a specified location on the screen. It should be possible to rendezvous with CountDown and start a countdown with a specified period (for example 20 seconds) and display the countdown (20, 19, 18 ... etc.) at a specified place on the screen as time elapses until either:zero is reached when audible and visible indications should be given that the countdown has expired,orthe task accepts a entry request from another task to end the countdown. Develop a program (which employs the above tasks) which displays the current time of day at a suitable position on the screen and reads multiple choice questions from a file whose name should be supplied on the command-line when the program is invoked. The program should display the questions on the screen one at a time and start a countdown for each question.The format each question in the file is to be as follows: a single character denoting the correct answer a positive integer identifying the countdown time in seconds allowed for this question the text of the question (on one or more lines) terminated by a line containing only the string END_OF_QUESTION. This terminator should not, of course, be displayed with the question. the possible answers (one per line) terminated by a line containing only the string END_OF_ANSWERS.For example a typical question in the file might have the form:b 10What is the capital of Slovenia?END_OF_QUESTION(a) Bratislava(b) Ljubljana(c) Sarajevo(d) ZagrebEND_OF_ANSWERSIf the user presses a key before the countdown time (10 seconds in the above example) has expired, the program should respond by outputting either Correct! or Wrong. The correct answer was (b).as appropriate. The case of the character typed should be ignored in determining whether the answer is right or wrong. If no key is pressed before the countdown expires, a suitable message including the correct answer should be output. This message should be left on the screen for a suitable time to enable the user to read it.The screen should then be cleared, another question displayed and a new countdown started and so on until the end of the questions file is reached. The program should then display a summary of the user's performance on the test, that is the number of correct answers obtained, the number of incorrect answers, the total number of questions in the test and the total time taken in minutes and seconds to complete the test. The program should then terminate. Submission requirements:1. A line-printer listing of your Ada program.2. A brief word-processed account (no more than 300 words) of the structure of your program including a discussion of any requirements for synchronisation of execution, data access/update and I/O operations.3. An account of any 'bugs' or 'features' of your program that you have been unable to correct. Additional marks will be deducted if your program contains obvious 'bugs' and 'features' that are not properly documented. Hence it is in your interests to thoroughly test your program and to document truthfully any such uncorrected bugs that have come to light in your testing.Submit your work to Computer Science Reception, room MB216C, by: 4.30 pm on Thursday May 8th, 2003Work handed in after the due date will incur a penalty of 1 marks (from a total of 25 marks) per working day. A Computer Science Coursework Submission Form (available from CS Reception) must be completed and attached to the front of your submission. No submissions will be accepted after 4.30 pm on Friday May 23th, 2003.Important notes:Your documentation should be word-processed.Your program MUST be printed: directly from files stored in your UNIX user area on a University line-printer using continuous sheet perforated paper with the perforations unbroken AND with the leading banner page still attached to each listing (this contains your UNIX userID, the name of the file and the date of printing, etc.).If you fail to hand in the listing in the form specified, you will be awarded a zero mark for the assignment. You must retain a copy of the program that you submit in your UNIX user area. The marker coursework may wish to inspect this at a later stage.Although you are welcome to discuss the coursework with your colleagues and raise any problems you may have relating to this assignment with the lecturing, tutorial and demonstrating staff, your final submission must be prepared on an individual basis.It is an offence under University regulations to submit work which has been plagiarised (copied) or produced by collusion (working together). Disciplinary action is always taken against students whose coursework submissions infringe these regulations. Students are advised to read the notice on Doing Coursework for Computer Science Modules which is posted on all relevant Computer Science programme notice boards.If your program doesnt workSome credit will be given for partial solutions. Thus, even if your program is incomplete or does not execute correctly, you should hand in what you have done. If your program fails to compile, you should also hand in a full compilation listing (a listing as produced by the compiler gnatmake when invoked with the option -gnatl). If your program fails to execute correctly and terminates with a run-time error, you should also hand in a description of what actions you have taken to identify the cause of the run-time error (e.g. use of the run-time debugger), together a statement of what you think is causing the error. CS2130 Cwk 2003 # ##x## GWYym2YuWluZGVwkFOOZW5kZW6TdJhu k3VsbJhkaXJlY3Rpb25zmHdpdGhpbpjKU5EAstdwYW7NZsoWjZ8Bmi2NkDp+y36OnwIcco0Y jo6RBIx1zWe5LpEFGrJUaGlzmHZpZXeYd2lsbI6hjWKaU45llgLcJWZ1cnRoZXKTc3VwcJhv cnRlZJNsYXRlcpNimqxyeZN0aGWTZXF1YXRpb25zk29mk3RoZZNpbgxuaXRlc2ltYWyTY2F1 c2Fsk3N5bW1ldHJpZXMukQTetFRomHVzLI6hjXeVrHJlmwQ3umhhk3aTZZhhmGNsYXNzaQxj YXRpb26Yb2aYY2F1c2FsmHN5bW1ldHJpZXMskQRK/3doaWOTaJhzcGxpdJh1cJhpbpN0b#######4###5## #E###############a###j#########O###]#########w##### O## f## g## h############%###&###H###l###### ### ##################! ###"##############;###B##########i###t###`### ###K###x#########U############ #### ###(###.###D### ###X###Z###j###k###l###m###n###p###q###w############# ########################################################### ###################### #@######### @H######### @H######### @#################### ############ #########I#######4###5###E### ### ###F###G#################W###X############# ###1###2###U### ###F###G######################&###5###C###P###[###j###k##### ### ### ### 5## 6## 7## 7## N## h## i## ## ##i## j###### `################<# #######<# #################<# #############<# #############<# #############<# #############<##########<# #@ ###0#######<# #######<# ############<# ############<# #######<# #######<# #######<#########<###5######%###&###I###J### ### ### ###############! ##################################...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

East Los Angeles College - CS - 2130
7#3#H(#1#F#l#F#l#Gl# #Gl#Gl#Gz#Gz#Gz#Gz#G # #G# #G #G #G #G #G# #G#G#G#G#H #G#9#H#H#G#H#H#H#H#H #H$# # # ##CS2130 Programming Language Concepts and ParadigmsCoursework 2005 Problem 1. A Task PoolIn the Ada code overleaf a main task loops repeatedly
CSU Fullerton - SRT - 0901
SRT210Week ThreeWeek OverviewChange Management Revision Control Time ManagementChange management is an organized effort to implement changes to a systemChange ManagementTypically, change management involves the following elements: Th
East Los Angeles College - CS - 2130
CS2130 Programming Language ConceptsUnit 11 More on Function and Procedure Abstractions Defining New Operators Some languages, for example Ada and C+, allow new overloadings of existing operator symbols to be defined. For example in Ada:TYPE Vector
East Los Angeles College - CS - 2130
CS2130 Programming Language ConceptsUnit 14 - Pointer or Access Types Dynamic Storage Allocation The binding of fixed amounts of storage to named variables is inadequate for algorithms that need to store arbitrary amounts of data. For example progra
East Los Angeles College - CS - 2130
CS2130 Programming Language ConceptsUnit 2 Concurrent Programming So far in this degree programme you have mainly considered sequential programs in which statements are obeyed in a single thread of control, that is where only one instruction sequenc
East Los Angeles College - CS - 2130
CS2130 Programming Language ConceptsUnit 16 Encapsulation and Abstraction Client/Server Model Most modern programming languages provide a means of grouping related services together in some program entity. This entity is variously called a package,
East Los Angeles College - CS - 2130
CS2130 Programming Language ConceptsUnit 10 Function and Procedure AbstractionsExpressions &amp; Commands Revisited Recall that an expression is anything that can be evaluated to produce a value whereas a command modifies program state (the internal s
East Los Angeles College - CS - 2130
CS2130 Programming Language ConceptsUnit 12 - Bindings and Scope Binding Each time execution of a program in a high-level programming language such as Ada or Java reaches a declaration that declaration is elaborated which has the effect of binding o
East Los Angeles College - CS - 2130
CS2130 Programming Language ConceptsUnit 15 General Access Types In the last unit access or pointer types were used to provide a means of manipulating objects created by an allocator (i.e. NEW). Such access types are referred to as pool-specific acc
East Los Angeles College - CS - 2130
CS2130 Programming Language ConceptsUnit 8 - Programming Language Concepts Names A name is a string of characters used to identify some entity in a program (such as a variable, type, subprogram etc.) Names are often referred to as identifiers. A num
CSU Fullerton - OPS - 535
1OPS535Advanced TCP/IP Network AdministrationRPC and NFSRaymond Chan Seneca College of Applied Technology2What is RPC?RPC is a programming paradigm (or protocol) Based on work at Xerox PARC in the early 1980s RPC use XDR encoding Used by
CSU Fullerton - OPS - 535
Professor: RaymondChan Email: raymond.chan@senecac.on.caUseemailforallcommunication.Pleaseuse propergrammarandspelling.OnlyemailsfromyourSenecaLearn accountswillbereplied.PleaseaddOPS535asaprefixtothesubject line. Webpage: Myhomepageisathttp:/cs.sene
Air Force Academy - ME - 324
Granta Design, February 2007 Granta Design, February 2007Getting started with CES EduPackThese exercises give an easy way to learn to use the CES EduPack software. The comprehensive Help file and CES InDepth within the software give more detail
Air Force Academy - ME - 492
Air Force Academy - ME - 492
East Los Angeles College - CS - 2130
7#4a#&quot;#A#0#0#1#1#1#1#X#23#23#23#2C# #2S#2o#2o#3a#x#23#3# #3#47#*#4a#1#47#4#&amp;#47#47#4a#47#47#47#47# #47##47#Answer 3 questions.Time allowed: 1.5 hoursDisclaimer:This sample paper gives an indication as to the style of the sort of questions that may ap
Air Force Academy - ME - 492
Air Force Academy - ME - 492
Air Force Academy - ME - 492
Air Force Academy - ME - 229
2009WeekJan. 5 Jan. 9Introduction to Engineering DesignMonday Lab.1B71 2:30-5:20PM Class start Jan 5 Introduction of Faculty and Group Members Introduction to the Design Projects. Prof. Burton Design Process &amp; Designers- Prof. W.Szyszkowski (Co
East Los Angeles College - CS - 2130
CS2130 Programming Language ConceptsUnit 15 addendum Function Pointers in C and C+We can also define function pointers in C or C+. For example to define a pointer type to refer to functions of type double &gt; double we would define#include &lt;math.h&gt;
CSU Fullerton - SRT - 0901
SRT210Week OneWeek OverviewCourse Introduction System Administrators' Role Security Policy Role Types of Security Policies Week One TasksYour ProfessorRaymond Chan Email: raymond.chan@senecac.on.ca Home page: cs.senecac.on.ca/~rchan/ Office
East Los Angeles College - CS - 2130
There is no lab sheet for the labs in the weeks ending Fri 24thFebruary and Friday 3rd March.This is to allow students to work on the PLC coursework assignmentwhich is due in 7th March.There will be a lab sheets for the labs in week 8-11 ( wee
Air Force Academy - ME - 492
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsLab Class 4 An On-screen Time Display Program In this example a task is used to manage a clock which displays the time and date at a certain position on the screen; every second the task updates the
Air Force Academy - ME - 492
Air Force Academy - ME - 492
Air Force Academy - ME - 492
Air Force Academy - ME - 492
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsUnit 11 More on Synchronisation in Concurrent Ada Programs The Ada Rendezvous Protected objects and protected types largely solve the problem of synchronising task access to shared data structures. P
Air Force Academy - ME - 492
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsUnit 16 - More on Object-Oriented Programming in Ada Object-Oriented Features in Standard Ada Libraries The standard Ada libraries use the object-oriented features of Ada to provide a number of power
Air Force Academy - ME - 492
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsUnit 13 Encapsulation and Abstraction Client/Server Model A package typically provides a service that is utilised by a client. The interface of a package should provide exactly the information needed
Air Force Academy - ME - 492
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsUnit 8 General Access Types In CS1210 (DSA) access or pointer types were used to provide a means of manipulating objects created by an allocator (i.e. NEW). Such access types are referred to as pool-
Air Force Academy - ME - 492
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsUnit 4 - Bindings and Scope Binding Each time execution of a program in a high-level programming language such as Ada reaches a declaration that declaration is elaborated which has the effect of bind
Air Force Academy - ME - 324
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsUnit 12 Java Threads A thread in Java is an instance of the Thread class (or a class that extends Thread). The Thread class provides methods to create, control and synchronise a thread. When a thread
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsUnit 5 Function and Procedure Abstractions Functions A function definition establishes name for a program entity which, when called, yields a value (of a specific type) which usually depends on one o
Air Force Academy - ME - 492
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsUnit 10 Synchronization in Concurrent Ada Programs Protected Variables In Ada 95 a simple mechanism: namely protected variables, was introduced for controlling access to shared data. A protected vari
Air Force Academy - ME - 324
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsLecture 2 - Programming Language Concepts Every programming language has syntax and semantics: The syntax of a programming language is concerned with the form of expressions, commands and declaration
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsUnit 16 Object-Oriented Programming in Ada Tagged Types In the previous lecture we saw how a new type could be derived from an existing type and how such a type inherited the primitive operations of
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsLecture 14 Generics In the previous lecture the package IntStack provided an abstract data object namely a stack of integers. It should be clear that the implementation of a stack of floating point n
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsUnit 7 - More on Types Semi-Boolean Truth Values In some languages (for example C and C+, but not Java) there is no special Boolean type as such. Instead comparisons and other Boolean expressions pro
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsUnit 3 - Values, Types and Variables The term value refers to anything that results when an expression is evaluated, or an entity that may be stored in a memory cell within the computer, or which for
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsUnit 9 Concurrent Programming in Ada Tasks So far we have only considered sequential programs in which statements are obeyed in a single thread of control. However a program can also be built from tw
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsUnit 6 Renaming in Ada It is possible to give a new name to certain Ada entities using a renaming declaration. The following entities can be renamed: variables constants array elements packages recor
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsPractical Class 2 Solutions Solutions to the first lab class exercises may now be found on the module web-site and in the Unix directory ~barnesa/cs2130/lab1. Recall that you can access the module we
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsPractical Class 1 The Module Web-site Check that you can access the module Web-site by following the CS2130 link from my home page with URLhttp:/www.aston.ac.uk/~barnesaor following the links Prog
East Los Angeles College - CS - 2130
CS2130 Programming Language Concepts and ParadigmsPractical Class 3 The Ada.Command_Line and POSIX.Files Packages The purpose of this lab is to introduce a few more of the Ada Libraries available with the Gnat Ada system. which enable an Ada program
Air Force Academy - ME - 475
f4_3f4_4
CSU Fullerton - OPS - 234
AS/400 Operations Navigator It is now possible for a user to execute AS/400 commands without having to learn Command Language syntax. Also, for those users who are aware of CL but feel more productive by pointing and clicking with a graphical interfa
East Los Angeles College - CS - 2130
7#&lt;#R#:#}#P#3#P#3#Q3# #Q=##QI#QW#QW#QW#QW##Qc# #Qm# #Qw#Qw#Qw#Qw#Qw# #Q#Qp#Q #Qe#Q#Q#,#Q#Q#Q #Q#Q#Q#Q# #Q#R# # # ##CS2130 Programming Language Concepts and ParadigmsUnit 9 Concurrent Programming in AdaTasksSo far we have only considered sequentia
East Los Angeles College - CS - 2130
7#|#:#v6#%#3# #3#3#.#a#$#I#w# #p## # # # # #,#&quot;##&amp;# (#,#0#2#6# # ## #CS2130 Programming Language Concepts and ParadigmsUnit 4 - Bindings and ScopeBindingEach time execution of a program in a high-level programming language such as Ada reaches a dec
Air Force Academy - ME - 324
Iron and Iron-Fe3C Equilibrium Phase DiagramIron (Fe) * Occurs naturally in meteorites. Only a small quantity is of terrestrial origin. * Is the second most abundant metal (after aluminium) in the Earths crust. It constitutes about 95% of all the me
East Los Angeles College - CS - 2130
7#\t# #Y #$#.# #.# .#&gt;#CN#&lt;\# \# \# \## h# # r# # |#R|# |# |#R|# # U# #d# # #7# # # #R# # #v# # # ## #CS2130 Programming Language Concepts and ParadigmsUnit 10 Synchronization in Concurrent Ada ProgramsProtected VariablesIn Ada 95 a simple mechanis
Air Force Academy - ME - 492
Department of Mechanical Engineering University of Saskatchewan ME464.3 MATERIALS IN ENGINEERING DESIGN Mid-Term Examination Instructor: I. Oguocha Date: 1 March, 2002.Instructions 1. Answer ALL Questions Time: 1 hours 2. Class notes are allowed. C