1. Compare and contrast declarative and imperative paradigms
Declarative paradigms is a style of building the structure and elements of computer programs—that expresses the logic of a computation without describing its control flow
1.Don't allow side effects.
2.Sequence of the steps is not crucial.
1.Don't allow side effects.
2.Sequence of the steps is not crucial.
Declarative paradigms that you know from languages, like HTML,XML,CSS,SQL,HASKEL
Imperative programming is a programming paradigm that uses statement that change a program's state
1..Allow side effects
2.Control flow is explicit how the operation took place step by step
Imperative paradigms that you know from languages, like C, C++, C#, PHP and Java
1..Allow side effects
2.Control flow is explicit how the operation took place step by step
Imperative paradigms that you know from languages, like C, C++, C#, PHP and Java
2. Discuss the difference between procedural programming and functional programming.
Procedural programming is a programming paradigm, derived from structured programming, based upon the concept of the procedure call. Procedures, also known as routines, subroutines, or functions (not to be confused with mathematical functions, but similar to those used in functional programming), simply contain a series of computational steps to be carried out- The output of a routine does not always have a direct correlation with the input.
- Everything is done in a specific order.
- Execution of a routine may have side effects.
- Tends to emphasize implementing solutions in a linear fashion.
Functional programming is a programming paradigm — a style of building the structure and elements of computer programs — that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data
- Often recursive.
- Always returns the same output for a given input.
- Order of evaluation is usually undefined.
- Must be stateless. i.e. No operation can have side effects.
- Tends to emphasize a divide and conquer approach.
- May have the feature of Lazy Evaluation.
3. Explain the Lambda calculus and Lambda expressions in functional programming.
Lambda calculus is a framework developed by Alonzo Church in 1930s to study computations with functions. Function creation − Church introduced the notation λx.E to denote a function in which ‘x’ is a formal argument and ‘E’
is the functional body.
4. What is meant by “no side-effects” and “referential transparency” in functional programming?
Referential Transparency
A function that returns always the same result for the same input is called a pure function. A pure function therefore is a function with no observable side effects, if there are any side effects on a function the evaluation could return different results even if we invoke it with the same arguments. We can substitute a pure function with its calculated value
No side-effects
In computer science , a function or expression is said to have a side effect if it modifies some state outside its local environment , that is to say has as observable interaction with the outside world beside returning a value. in function programming side effect are rarely used.
In computer science , a function or expression is said to have a side effect if it modifies some state outside its local environment , that is to say has as observable interaction with the outside world beside returning a value. in function programming side effect are rarely used.
5. Discuss the key features of Object Oriented Programming.
Abstraction is one of the key concepts of object oriented programming language. Its main goal is to handle complexity by hiding unnecessary details from the user. That enables the user to implement more complex logic on top of the provided abstraction without understanding or even thinking about all the hidden complexity
Inheritance is a feature that represents the "is a" relationship between different classes. Inheritance allows a class to have the same behavior as another class and extend or tailor that behavior to provide special action for specific needs.
Polymorphism is the provision of a single interface to entities of different types or the use of a single symbol to represent multiple different type.There are two types of polymorphism in Java: compile-time polymorphism and runtime polymorphism. We can perform polymorphism in java by method overloading and method overriding.
6. How the event-driven programming is different from other programming paradigms?Inheritance is a feature that represents the "is a" relationship between different classes. Inheritance allows a class to have the same behavior as another class and extend or tailor that behavior to provide special action for specific needs.
Event-driven programming paradigm in witch the flow execution is determined by events
ex - a user action such as a mouse click, key press, or a message from the operating system or another program
- Compiled languages is a programming language whose implementations are typically compilers (translators that generate machine code from source code), and not interpreters (step-by-step executors of source code, where no pre-runtime translation takes place).
- Scripting languages is a type of language that is designed to integrate and communicate with other programming languages.
- Examples of commonly used scripting languages include JavaScript, VBScript, PHP among others.
- There are mostly used in conjunction with other languages, either programming or markup languages.
- Markup Languages is a computer language that uses tags to define elements within a document. They are easier to read. These languages are designed to create a structure, identify data or to present data rather than to execute an action or to perform an action
8. Discuss the role of the virtual runtime
machine
machine
A Java virtual machine (JVM), an implementation of the Java Virtual Machine Specification, interprets compiled Java binary code (called bytecode) for a computer's processor (or "hardware platform") so that it can perform a Java program's instructions. Java was designed to allow application programs to be built that could be run on any platfo without having to be rewritten or recompiled by the programmer for each separate platform. A Java virtual machine makes this possible because it is aware of the specific instruction lengths and other particularities of the platform.
9. Find how the JS code is executed (What is the runtime? where
do you find the interpreter?)
first source code is passed through a program called a compiler ,which translates it into byte code that the machine understands and can execute.in contrast,java script has no compilation step .instead an interpreter in browser reads over the java script code interprets each line ,and run it
first source code is passed through a program called a compiler ,which translates it into byte code that the machine understands and can execute.in contrast,java script has no compilation step .instead an interpreter in browser reads over the java script code interprets each line ,and run it
10. Explain how the output of an HTML document is rendered, indicating the tools used to display the output.
HTML File
<html>
<head>
</head>
<body>
<h1>HELLO WORLD</h1>
<h3> HELLO WORLD</h3>
</body>
</html>
HTML File
<html>
<head>
</head>
<body>
<h1>HELLO WORLD</h1>
<h3> HELLO WORLD</h3>
</body>
</html>
Output
HELLO WORLD
HELLO WORLD
Running an HTML File
HELLO WORLD
HELLO WORLD
Running an HTML File
- Make sure that there is a browser installed on your computer.
- Find the saved file.
- Right-click (Windows) or double-click (Mac) the file and select "Open with" from the action menu.
- View your HTML file in your chosen browser.
- Alternate method: Run your browser, then press Ctrl-O
11. Identify different types of CASE tools, Workbenches, and Environments for different types of software systems (web-based systems, mobile systems, IoT systems, etc.).
CASE software types
• Individual tools – for specific task
•Workbenches – multiple tools are combined,
focusing on specific part of SDLC
•Environments – combines many tool
CASE software types
• Individual tools – for specific task
•Workbenches – multiple tools are combined,
focusing on specific part of SDLC
•Environments – combines many tool
12. Discuss the difference between framework , library and plugin. giving some example
Framework A framework may be for a set of functions within a system and how they interrelate; the layers of an operating system; the layers of an application subsystem. How communication should be standardized at some level of a network. and so forth. A framework is generally more comprehensive than a protocol and more prescriptive than a structure
At development time
• Create the structure of the application
• Place your code in necessary places
• You may use the given libraries to write your code
• You can include additional libraries and plugins At run time
• The framework will call your code (inverse of control)
At development time
• Create the structure of the application
• Place your code in necessary places
• You may use the given libraries to write your code
• You can include additional libraries and plugins At run time
• The framework will call your code (inverse of control)
At run time
•The library will be called by the code
•The library will be called by the code
Library
Libraries provide an API, the coder can use it to develop some features, when writing code
At development time
•Add the library to the project (source code files,
modules, packages, executables, etc.)
•Call the necessary functions/methods using the
given packages/module/classes
At run time
•The library will be called by the code
Plugin
In computing, a plug-in (or plugin, add-in, addin, add-on, or addon) is a software component that adds a specific feature to an existing computer program. When a program supports plug-ins, it enables
customization.
At development time
•The plugin (source code files, modules, packages,
executables, etc.) is placed in the project,
•Apply some configurations using code
At run time
•The plug-in will be invoked via the configurations
•The plugin (source code files, modules, packages,
executables, etc.) is placed in the project,
•Apply some configurations using code
At run time
•The plug-in will be invoked via the configurations








No comments:
Post a Comment