Computer Concepts

Computing

Quiz 12 :

Computer Programming

Quiz 12 :

Computer Programming

Question Type
search
arrow
Describe the differences between event-driven, procedural, object-oriented, and declarative paradigms. Provide at least one example of a language that supports each paradigm.
Free
Essay
Answer:

Answer:

Difference between various paradigms
Programming paradigm is another method of classification of programming languages. Examples of paradigms include procedural paradigm (BASIC, COBOL, Ada), object-oriented paradigm (Java, C++), declarative paradigm (Prolog) and functional paradigm (LISP, Scheme), event-driven paradigm (VB, C#).
The primary differences between each type of programming paradigms are described below.
img Example of language that support all paradigms:
There are various programming languages that support more than one paradigm. For example Visual Basic is an even-driven programming language but it facilitates to create objects as well as DBMS programming. It can also use facts and rules for describing problems.

Tags
Choose question tag
close menu
arrow
Examine the code shown below. This program prints img lines of text. For n = 1 To 5 Print "Loop number " n Next n
Free
Essay
Answer:

Answer:

Refer to the following code given in the question:
For n = 1 To 5
Print "Loop number" n
Next n
• For-loop is a programming language statement which is used to repeatedly execute any statement to number of times. It is also called as iteration statement.
• Each for-loop has starting and terminating condition which states the number of times a loop iterates.
So, the output of the above code will be:
Loop number 1
Loop number 2
Loop number 3
Loop number 4
Loop number 5
As the for-loop contains 'For n = 1 To 5' statement, it means that the loop will continue to execute till n is 5 or less. Therefore, this program prints five lines of text.

Tags
Choose question tag
close menu
arrow
Create a diagram that shows how low-level and high-level languages relate to the five generations of computer languages.
Free
Essay
Answer:

Answer:

Generations of Computer Languages
There are five generations of computer languages. All the five generation languages are described below:
1. First Generat ion: The First Generation language is also known as Machine Language that is represented as in the series of 0's and 1's. The machine code is efficient but difficult to write.
2. Second Generation: The Second Generation Language is also known as Assembly Language. These are also known as mnemonics that are converted in the form of machine language.
3. Third Generation: The Third Generation Language is also known as High Level Language. They are designed to solve the general Problems. COBOL, C++ are third generation language. The source code is translated into machine language depending on the language.
This generation uses the platform independent syntax. This generation uses the third generation languages like FORTRAN, COBOL and BASIC.
4. Fourth Generation: The Fourth Generation Language is also known as Problem-oriented Language. It is a part of DBMS systems.
Following languages were used in this generation:
• Query Language: SQL is one of the Query Language.
• Application Generators: MS Access is one of the examples of Application Generators.
This generation uses all the higher level languages like C and C++, DBASE, etc., were used in this generation.
5. Fifth Generation: The Fifth Generation Language is also known as Natural Languages and Visual Programming.Microsoft Visual Basic is the example of Fifth Generation Language.
The relation of low level and high level languages with the five generations of computer languages is shown below:
img img

Tags
Choose question tag
close menu
arrow
Describe the three elements of a problem statement. Provide examples within the context of the pizza problem.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
While browsing through several programs posted online, you come across the following code and realize it is written using the img programming language. male(frodo). male(mungo). male(largo). male(balbo). female(berylla). female(belladonna). female(primula). female(sella). parents(mungo,berylla,balbo). parents(frodo,primula,drogo). parents(largo,berylla,balbo). parents(sella,berylla,balbo). brother_of(X,Y):- male(Y), parents(X,Mother,Father), parents(Y,Mother,Father).
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Create a sentence outline for Section E that focuses on techniques for secure programming.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Define the following terms associated with object-oriented programming: object, class, superclass, subclass, attribute, message, method, inheritance, polymorphism, and encapsulation.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Define the term algorithm and explain how it relates to procedural programming.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
List and describe at least eight tools other than programming languages that programmers use to create computer programs.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Create a flowchart, structured English, and pseudocode to express the algorithm for tying your shoes.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
List and describe three types of errors that are typically found when computer programs are tested.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Describe how buffer overflows and verbose error messages make computer programs vulnerable to hackers.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Write at least five Prolog facts that describe your relationships to members of your family.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Provide a ballpark figure for the number of lines of code in an operating system such as Windows 7.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Describe how the jobs performed by computer programmers differ from the jobs performed by software engineers and systems analysts.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
You've just joined a programming team that is developing a Java program for an earth-moving equipment vendor. The lead programmer shows you a UML with labels such as Cranes, Trucks, and Front-end Loaders. With your background in object-oriented programming, you can tell immediately that these are img , which will be coded as a series of attributes, such as private string manufacturer. img
Essay
Answer:
Tags
Choose question tag
close menu
arrow
A friend asks you for help writing a computer program to calculate the square yards of carpet needed for a dorm room. The statement "the living room floor is rectangular" is an example of a(n) img . The length and width of the room are examples of img information, which you can obtain as img from the user.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Continuing with the carpet example, you devise a set of steps, or a(n) img , to solve the problem. You then use a programming language to write the img shown below, which expresses the algorithm. Input "Enter the width of the room in feet: "; width Input "Enter the length of the room in feet: "; length Print "Carpet needed:" Print length*width " square feet" Print (length*width)/9 "square yards"
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Give an example of a sequence control structure, a selection control structure, and a repetition control structure.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Define the following terms associated with the declarative paradigm: fact, rule, predicate, arguments, goal, instantiation, and backtracking.
Essay
Answer:
Tags
Choose question tag
close menu
Showing 1 - 20 of 46