CSCI 305 Homework 1 Due Date: February 9, 2018 @ Beginning of Class

Name:

History Instruction: Select the single best answer (unless directed otherwise by the question) which answers the question. 1. What is the name of the paradigm that is based on formal logic and expresses facts and rules about some problem domain? (1 pt) a. functional b. concurrent c. logic d. non-deterministic e. metaprogramming f. object-oriented g. declarative h. imperative

2. What is the name of the paradigm that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data? (1 pt) a. event-driven b. concurrent c. scripting d. object-oriented e. logic f. imperative g. declarative h. functional i. metaprogramming j. non-deterministic

3. What language was the first to introduce some object-oriented concepts (but is not a fully object-oriented language)? (1 pt) a. COBOL b. LISP c. Fortran d. Simula e. Smalltalk f. PL/I g. Ada h. Algol i. BASIC j. C

4. What language is considered to be the first fully object-oriented language? (1 pt) a. Smalltalk b. C c. BASIC d. Simula e. Algol f. PL/I g. Fortran h. Ada i. COBOL j. LISP

5. Research "typeless language". Select ALL from the below that are DISadvantages of a typeless language (2 pts) a. It is often useful for very low-level languages used for systems programming b. it provides great flexibility for the programmer. c. Programmers can make changes to existing code in less time. d. Type checking is impossible; it is the programmer's responsibility to ensure that expressions and assignments are correct. e. Reading the code of another person may be more difficult. f. Such a language is easier to learn as a first programming language. g. It leads to an increase in the possibility of run-time errors. h. It results in poor reliability in type conversion and checking.

Grammar and Syntax 1. Construct a BNF grammar for each of the following languages. For example, a correct answer for "the set of all strings consisting of zero or more concatenated copies of the string ab " would be: ::= ab |

a. The set of all strings consisting of the keyword begin , followed by one or more statements with a semicolon after each one, followed by the keyword end . Use the non-terminal for statements, and do not give productions for it. (2 pts)

b. The set of all strings consisting of an open bracket (the symbol [ ) followed by a list of one or more digits separated by commas, followed by a closing bracket (the symbol ] ). (2 pts)

2. Construct an EBNF grammar for each of the languages in Grammars Question 1. Use the EBNF extensions wherever possible to simplify the grammars. In particular, you should eliminate explicit recursion form the grammars wherever possible. Don't forget to put single quotes around any EBNF metasymbol when using it as a token. a. (2 pts)

b. (2 pts)

3. Construct a syntax diagram for each of the languages in Grammars Question 1. Use branching and loops in your syntax diagrams to make them as clear as possible. a. (3 pts)

b. (3 pts)

CSCI 305 Homework 1 - GitHub

Feb 9, 2018 - 2. What is the name of the paradigm that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data? (1 pt) a. event-driven b. concurrent c. scripting d. object-oriented e. logic f. imperative g. declarative h. functional i. metaprogramming j. non-deterministic. 3.

32KB Sizes 4 Downloads 315 Views

Recommend Documents

CSCI 305 Homework 2 - GitHub
Feb 23, 2018 - Describe how Fortran common blocks work and give an example. What happens if two named common blocks with the same name contain different variables? What is the difference between a blank common and a named common? What does the linker

CSCI 305 Homework 5 - GitHub
Apr 16, 2018 - The following code fragment uses arrays in Java. The first line declares and allocates an array of two integers. The next two lines initialize it. int[] A = new int[2];. A[0] = 0;. A[1] = 2; f(A[0], A[A[0]]);. Function f is defined as:

Homework #1 - GitHub
Please select either bus 2 or 3 as reference bus, calculate the line flows, and check if the results are the same. 2. Come up with a case study of LP, and solve it in ...

Homework 12 - Magnetism - GitHub
region containing a constant magnetic field B = 2.6T aligned with the positive ... With what speed v did the particle enter the region containing the magnetic field?

Operating Systems Homework #3 - GitHub
May 14, 2015 - (Integer) Number indicating scheduling algorithm. 27 int policy;. 28. // Enum values for policy. 29 const short FCFS=0, SJF=1, PRIOR=2, RR=3;.

Homework 22 Physics 2220 - GitHub
Dec 2, 2014 - In order to determine y-component of E-vector, we need to use right-hand rule, which will give us negative sign and for the size we will have.

Operating Systems Homework #2 - GitHub
May 7, 2015 - #include ... unsigned int tick () { // get current time (msec) ... Repeat think-hungry-eating cycle during given execution time in secs.

Homework 1
Question 3. As you have learnt, a number of hosts using Ethernet, share a single channel and each collision decreases throughput. If hosts on a 6-host 10Mbps 80m Ethernet LAN send frames 64byte long, a. what is the scenario that maximizes throughput

Semester 2 Homework 1
Brad. ( I'm / I'll ) going home. ( lt / It's ) looks dangerous! Len, don't worry. (I / I've ) been lots of times. ( You'll / You ) won't get hurt. And ( you'll / you ) love it!

1 - GitHub
are constantly accelerated by an electric field in the direction of the cathode, the num- ...... als, a standard fit software written at the University of Illinois [Beechem et al., 1991], ...... Technical report, International Computer Science Instit

Homework 12 Solutions Problem 1
(where these operators are the ordinary Killing vectors, denoted by fµ = ϵM fM. µ in class.) Comment 1: The deeper reason for this minus sign follows from the ...

HOMEWORK
Homework​​is one​​of​​the​​options​​parents/legal​​guardians​​have​​to​​support​​their​​child's learning.

ACEC316 - Gantt Chart - Homework # 1
Mar 17, 2009 - If you are building or remodeling a home, you will be confronted with the ..... 30-Nov-2004 07-Dec-2004 Telephone System Rough-in.

1 - GitHub
Mar 4, 2002 - is now an integral part of computer science curricula. ...... students have one major department in which they are working OIl their degree.

Algebra 1 Honors - Homework Supplement.pdf
6 (y) 3. g - 4 4. _. 12. h. Evaluate each ... 2k + 7 = 15 33. 11 - 5m = -4 34. 23 = 9 - 2d. 35. _. 2 .... Algebra 1 Honors - Homework Supplement.pdf. Algebra 1 Honors ...

CSCI E-76 - cdn.cs76.net
. . My title. . . My link. My header. . . Page 7. . .

CSCI E-76 - cdn.cs76.net
. . My title. . . My link. My header. . . Page 7. . .

CSCI 1500 grades.pdf
Chicken little 48.6 F 5 0 9 6 6 - - - - - 125 63 - -. CYH 82.3 B 19 20 16 17 18 19 20 - - - 142 91 - -. Dr.Suess 89.5 B 19 20 19 11 19 19 20 - - - 135 132 - -. Duskie 37.5 F 18 20 16 12 2 - 7 - - - 90 - - -. Funky Monk 97.5 A 20 20 20 19 18 20 20 - -

Part 1 - GitHub
Apr 27, 2014 - Developing scalable applications with IBM MQ Light and ... Improving the sample application by separating the web-facing component from the.

1 Group Theory - GitHub
describing the group, one can encompass the transformations and their corresponding sym- metries. In fact, every symmetry has an associated group encompassing it. To make this discussion concrete, let's consider an example first and then delve into t