E Commersewebpage
E Commersewebpage
Abstract
In software engineering and computer science, abstraction is:
The process of removing or generalizing physical, spatial, or temporal details or attributes in
the study of objects or systems to focus attention on details of greater importance; it is similar
in nature to the process of generalization;
the creation of abstract concept-objects by mirroring common features or attributes of various
non-abstract objects or systems of study – the result of the process of abstraction.
Abstraction, in general, is a fundamental concept in computer science and software
development.[4] The process of abstraction can also be referred to as modeling and is closely
related to the concepts of theory and design. Models can also be considered types of
abstractions per their generalization of aspects of reality.
Abstraction in computer science is closely related to abstraction in mathematics due to their
common focus on building abstractions as objects, but is also related to other notions of
abstraction used in other fields such as art.
Abstractions may also refer to real-world objects and systems, rules of computational
systems or rules of programming languages that carry or utilize features of abstraction itself,
such as:
the usage of data types to perform data abstraction to separate usage from working
representations of data structures within programs;
the concept of procedures, functions, or subroutines which represent a specific of
implementing control flow in programs;
the rules commonly named "abstraction" that generalize expressions using free and bound
variables in the various versions of lambda calculus;
the usage of S-expressions as an abstraction of data structures and programs in the Lisp
programming language;
the process of reorganizing common behavior from non-abstract classes into "abstract
classes" using inheritance to abstract over sub-classes as seen in the object-oriented C+
+ and Java programming languages.
Computing mostly operates independently of the concrete world. The hardware implements
a model of computation that is interchangeable with others. The software is structured
in architectures to enable humans to create the enormous systems by concentrating on a few
issues at a time. These architectures are made of specific choices of abstractions. Greenspun's
Tenth Rule is an aphorism on how such an architecture is both inevitable and complex.
Abstraction features
Different programming languages provide different types of abstraction, depending on the
intended applications for the language. For example:
0bjectives
A prominent purpose of programming languages is to provide instructions to a computer. As
such, programming languages differ from most other forms of human expression in that they
require a greater degree of precision and completeness. When using a natural language to
communicate with other people, human authors and speakers can be ambiguous and make
small errors, and still expect their intent to be understood. However, computers do exactly
what they are told to do, and cannot understand the code the programmer "intended" to write.
The combination of the language definition, the program, and the program's inputs must fully
specify the external behaviour that occurs when the program is executed.
Many languages have been designed from scratch, altered to meet new needs, combined with
other languages, and eventually fallen into disuse. Although there have been attempts to
design one "universal" computer language that serves all purposes, all of them have failed to
be accepted in this role. The need for diverse computer languages arises from the diversity of
contexts in which languages are used:
Programs range from tiny scripts written by individual hobbyists to huge systems
written by hundreds of programmers.
Programmers range in expertise from novices who need simplicity above all else,
to experts who may be comfortable with considerable complexity.
Programs must balance speed, size, and simplicity on systems ranging
from microcontrollers to supercomputers.
Programs may be written once and not change for generations, or they may
undergo nearly constant modification.
Finally, programmers may simply differ in their tastes: they may be accustomed to
discussing problems and expressing them in a particular language.
One common trend in the development of programming languages has been to add more
ability to solve problems using a higher level of abstraction. The earliest programming
languages were tied very closely to the underlying hardware of the computer. As new
programming languages have developed, features have been added that let programmers
express ideas that are more removed from simple translation into underlying hardware
instructions. Because programmers are less tied to the needs of the computer, their programs
can do more computing with less effort from the programmer. This lets them write more
programs in the same amount of time.
Natural language processors have been proposed as a way to eliminate the need for a
specialized language for programming. However, this goal remains distant and its benefits are
open to debate. Edsger Dijkstra took the position that the use of a formal language is essential
to prevent the introduction of meaningless constructs, and dismissed natural language
programming as "foolish." Alan Perlis was similarly dismissive of the idea.
The syntax of a language describes the possible combinations of symbols that form a
syntactically correct program. The meaning given to a combination of symbols is handled by
semantics. Since most languages are textual, this article discusses textual syntax.
Not all syntactically correct programs are semantically correct. Many syntactically correct
programs are nonetheless ill-formed, per the language's rules; and may (depending on the
language specification and the soundness of the implementation) result in an error on
translation or execution. In some cases, such programs may exhibit undefined behaviour.
Even when a program is well-defined within a language, it may still have a meaning that is
not intended by the person who wrote it.
" Colorless green ideas sleep furiously." is grammatically well-formed but has no
generally accepted meaning.
"John is a married bachelor." is grammatically well-formed but expresses a
meaning that cannot be true.
The following C language fragment is syntactically correct, but performs an operation that is
not semantically defined (because p is a null pointer, the operations p->real and p->im have
no meaning):
complex *p = NULL;
complex abs_p = sqrt (p->real * p->real + p->im * p->im);
Type system
A type system defines how a programming language classifies values and expressions
into types, how it can manipulate those types and how they interact. This generally includes a
description of the data structures that can be constructed in the language. The design and
study of type systems using formal mathematics is known as type theory.
Internally, all data in modern digital computers are stored simply as zeros or ones ( binary).
The data typically represent information in the real world such as names, bank accounts and
measurements, so the low-level binary data are organized by programming languages into
these high-level concepts as data types. There are also more abstract types whose purpose is
just to warn the programmer about semantically meaningless statements or verify safety
properties of programs.
By opposition, an untyped language, such as most assembly languages, allows any operation
to be performed on any data type. High-level languages which are untyped include BCPL and
some varieties of Forth.
In practice, while few languages are considered typed from the point of view of type theory
(verifying or rejecting all operations), most modern languages offer a degree of typing. Many
production languages provide means to bypass or subvert the type system.
Static vs dynamic typing
In static typing all expressions have their types determined prior to the program being run
(typically at compile-time). For example, 1 and (2+2) are integer expressions; they cannot be
passed to a function that expects a string, or stored in a variable that is defined to hold dates.
Statically-typed languages can be manifestly typed or type-inferred. In the first case, the
programmer must explicitly write types at certain textual positions (for example, at
variable declarations). In the second case, the compiler infers the types of expressions and
declarations based on context. Most mainstream statically-typed languages, such as C++
and Java, are manifestly typed. Complete type inference has traditionally been associated
with less mainstream languages, such as Haskell and ML. However, many manifestly typed
languages support partial type inference; for example, Java and C# both infer types in certain
limited cases.
Dynamic typing, also called latent typing, determines the type-safety of operations at runtime;
in other words, types are associated with runtime values rather than textual expressions. As
with type-inferred languages, dynamically typed languages do not require the programmer to
write explicit type annotations on expressions. Among other things, this may permit a single
variable to refer to values of different types at different points in the program execution.
However, type errors cannot be automatically detected until a piece of code is actually
executed, making debugging more difficult. Lisp, JavaScript, and Python are dynamically
typed.
Weak and strong
Weak typing allows a value of one type to be treated as another, for example treating a string
as a number. This can occasionally be useful, but it can also cause bugs; such languages are
often termed unsafe. C, C++, and most assembly languages are often described as weakly
typed.
Strong typing prevents the above. Attempting to mix types raises an error. Strongly-typed
languages are often termed type-safe or safe, but they do not make bugs
impossible. Ada, Python, and ML are strongly typed.
An alternate definition for "weakly typed" refers to languages, such as Perl, Javascript,
and C++ which permit a large number of implicit type conversions; Perl in particular can be
characterized as a dynamically typed programming language in which type checking can take
place at runtime. See type system. This capability is often useful, but occasionally dangerous;
as it would permit operations whose objects can change type on demand.
Strong and static are generally considered orthogonal concepts, but usage in the literature
differs. Some use the term strongly typed to mean strongly, statically typed, or, even more
confusingly, to mean simply statically typed. Thus C has been called both strongly typed and
weakly, statically typed..
Execution semantics
Once data has been specified, the machine must be instructed to perform operations on the
data. The execution semantics of a language defines how and when the various constructs of a
language should produce a program behaviour.
For example, the semantics may define the strategy by which expressions are evaluated to
values, or the manner in which control structures conditionally execute statements.
Core library
Most programming languages have an associated core library (sometimes known as the
'Standard library', especially if it is included as part of the published language standard),
which is conventionally made available by all implementations of the language. Core
libraries typically include definitions for commonly used algorithms, data structures, and
mechanisms for input and output.
A language's core library is often treated as part of the language by its users, although the
designers may have treated it as a separate entity. Many language specifications define a core
that must be made available in all implementations, and in the case of standardized languages
this core library may be required. The line between a language and its core library therefore
differs from language to language. Indeed, some languages are designed so that the meanings
of certain syntactic constructs cannot even be described without referring to the core library.
For example, in Java, a string literal is defined as an instance of the java.lang.String class;
similarly, in Smalltalk, an anonymous function expression (a "block") constructs an instance
of the library's BlockContext class. Conversely, Scheme contains multiple coherent subsets
that suffice to construct the rest of the language as library macros, and so the language
designers do not even bother to say which portions of the language must be implemented as
language constructs, and which must be implemented as parts of a library.
practice
A language's designers and users must construct a number of artifacts that govern and enable
the practice of programming. The most important of these artifacts are the
language specification and implementation.
Specification
The specification of a programming language is intended to provide a definition that
language users and implementors can use to interpret the behaviour of programs when
reading their source code.
A programming language specification can take several forms, including the following:
An explicit definition of the syntax and semantics of the language. While syntax is
commonly specified using a formal grammar, semantic definitions may be written
in natural language (e.g., the C language), or a formal semantics (e.g.,
the Standard ML and Scheme specifications).
A description of the behaviour of a translator for the language (e.g., the C+
+ and Fortran). The syntax and semantics of the language has to be inferred from
this description, which may be written in natural or a formal language.
A model implementation, sometimes written in the language being specified
(e.g., Prolog). The syntax and semantics of the language are explicit in the
behaviour of the model implementation.
Implementation
An implementation of a programming language provides a way to execute that program on
one or more configurations of hardware and software. There are, broadly, two approaches to
programming language implementation: compilation and interpretation. It is generally
possible to implement a language using both techniques.
Programs that are executed directly on the hardware usually run several orders of magnitude
faster than those that are interpreted in software.
Linking Using a Linker program to convert object code to executable code. Multiple units
of object codes are linked to together in this step.
Loading Using a Loader program to load the executable code into CPU for execution.
Compilation Linking
After all of the files are compiled, they must be "merged together" to produce a single
executable file that the user use to run the program.
In C, most compiled programs produce results only with the help of some standard
programs, known as library files that reside in the computer. This process is called linking.
The result obtained after linking is called the executable file.
To do this, it first scans the files and concatenates the related file sections to form one large
file. Then, it makes a second pass on the resulting file to bind symbol names to real memory
addresses.
Loading is loading the executable into memory prior to execution.
METHODOLOGY
When programs are developed to solve real-life problems like inventory management, payroll
processing, student admissions, examination result processing, etc. they tend to be huge and
complex. The approach to analyzing such complex problems, planning for software
development and controlling the development process is called programming methodology.
Types of Programming Methodologies There are many types of programming methodologies
prevalent among software developers: Procedural Programming Problem is broken down into
procedures, or blocks of code that perform one task each. All procedures taken together form
the whole program. It is suitable only for small programs that have low level of complexity.
Example: For a calculator program that does addition, subtraction, multiplication, division,
square root and comparison, each of these operations can be developed as separate
procedures. In the main program each procedure would be invoked on the basis of user’s
choice. Object-oriented Programming Here the solution revolves around entities or objects
that are part of problem. The solution deals with how to store data related to the entities, how
the entities behave and how they interact with each other to give a cohesive solution.
Example: If we have to develop a payroll management system, we will have entities like
employees, salary structure, leave rules, etc. around which the solution must be built.
Functional Programming Here the problem, or the desired solution, is broken down into
functional units. Each unit performs its own task and is self-sufficient. These units are then
stitched together to form the complete solution. Example: A payroll processing can have
functional units like employee data maintenance, basic salary calculation, gross salary
calculation, leave processing, loan repayment processing, etc. Logical Programming Here the
problem is broken down into logical units rather than functional units. Example: In a school
management system, users have very defined roles like class teacher, subject teacher, lab
assistant, coordinator, academic in-charge, etc. So the 1. Programming Methodologies ─
Introduction Programming Methodologies 2 software can be divided into units depending on
user roles. Each user can have different interface, permissions, etc. Software developers may
choose one or a combination of more than one of these methodologies to develop a software.
Note that in each of the methodologies discussed, problem has to be broken down into
smaller units. To do this, developers use any of the following two approaches:
Top-down approach
The problem is broken down into smaller units, which may be further broken down into even
smaller units. Each unit is called a module. Each module is a self-sufficient unit that has
everything necessary to perform its task. The following illustration shows an example of how
you can follow modular approach to create different modules while developing a payroll
processing program. Payroll Processing Get Employee Data Calculate Net Pay Calculate
Gross Pay Calculate Deductions Update Employee Record Print Payslip Get Employee
Record Get Net Pay Details Get Leave Records Programming Methodologies 3 Bottom-
upApproach In bottom-up approach, system design starts with the lowest level of
components, which are then interconnected to get higher level components. This process
continues till a hierarchy of all system components is generated. However, in real-life
scenario it is very difficult to know all lowest level components at the outset. So bottoms up
approach is used only for very simple problems. Let us look at the components of a calculator
program. Calculator Single input operation Square root Algorithmic value Logical NOT Two
input operation Comparison Logical AND Multiple Input operation Addition Subtraction
Multiplication Division Programming Methodologies 4 A typical software development
process follows these steps:
Requirement gathering
Problem definition
System design
Implementation
Testing
Documentation
Maintenance
The first two steps assist the team in understanding the problem, the most crucial first step
towards getting a solution. Person responsible for gathering requirement, defining the
problem and designing the system is called system analyst.
CODE
Index.html
<!DOCTYPE html>
<html>
<head>
<title>
Simple web Development Template
</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<nav class="navbar background">
<ul class="nav-list">
<div class="logo">
<img src="ping.jpg">
</div>
<li><a href="https://www.w3schools.com/">web development </a></li>
<li><a href="https://www.javatpoint.com/c-programming-language-
tutorial">c programming</a></li>
<li><a href="https://www.w3schools.com/java/default.asp">JAVA</a></li>
</ul>
<div class="rightNav">
<input type="text" name="search" id="search">
<button class="btn btn-sm">Search</button>
</div>
</nav>
<section class="firstsection">
<div class="box-main">
<div class="firstHalf">
<h1>
WEB DEVELOPMENT
</h1>
<p class="text-small">
HTML stands for HyperText Markup
Language. It is used to design
web pages using a markup language.
HTML is the combination of Hypertext
and Markup language. Hypertext
defines the link between the web
pages. A markup language is used
to define the text document within
tag which defines the structure of
web pages. HTML is a markup language
that is used by the browser to
manipulate text, images, and other
content to display it in the required
format.
</p>
</div>
</div>
</section>
<section class="secondsection">
<div class="box-main">
<div class="secondHalf">
<h1>
C PROGRAMMING
</h1>
<p class="text-small">
C is a procedural programming language.
It was initially developed by Dennis
Ritchie as a system programming
language to write operating system.
The main features of C language include
low-level access to memory, simple set
of keywords, and clean style, these
features make C language suitable for
system programming like operating system
or compiler development.
</p>
</div>
</div>
</section>
<section class="section">
<div class="paras">
<h1>JAVA</h1>
Style.css
<style>
*{
margin: 0;
padding: 0;
}
.navbar {
display: flex;
align-items: center;
justify-content: center;
position: sticky;
top: 0;
cursor: pointer;
}
body{
background-image: url("back1.jpg");
height: 100vh;
}
.nav-list {
width: 70%;
display: flex;
align-items: center;
}
.logo {
display: flex;
justify-content: center;
align-items: center;
}
.logo img {
width: 180px;
border-radius: 50px;
}
.nav-list li {
list-style: none;
padding: 26px 30px;
}
.nav-list li a {
text-decoration: none;
color: white;
}
.nav-list li a:hover {
color: grey;
}
.rightnav {
width: 30%;
text-align: right;
}
#search {
padding: 5px;
font-size: 17px;
border: 2px solid grey;
border-radius: 9px;
}
.box-main {
display: flex;
justify-content: center;
align-items: center;
color: black;
max-width: 80%;
margin: auto;
height: 80%;
}
.firsthalf {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}
.secondhalf {
width: 30%;
}
.secondhalf img {
width: 70%;
border: 4px solid white;
border-radius: 150px;
display: block;
margin: auto;
}
.text-big {
font-family: 'Piazzolla', serif;
font-weight: bold;
font-size: 35px;
}
.text-small {
font-size: 18px;
}
.btn {
padding: 8px 20px;
margin: 7px 0;
border: 2px solid white;
border-radius: 8px;
background: none;
color: white;
cursor: pointer;
}
.btn-sm {
padding: 6px 10px;
vertical-align: middle;
}
.section {
height: 400px;
display: flex;
align-items: center;
justify-content: center;
max-width: 90%;
margin: auto;
background-color: ;
}
.section-Left {
flex-direction: row-reverse;
}
.paras {
padding: 0px 65px;
}
.center {
text-align: center;
}
.text-footer {
text-align: center;
padding: 30px 0;
font-family: 'Ubuntu', sans-serif;
display: flex;
justify-content: center;
color: grey;
}
</style>
Output:
CONCLUSION:
Finally ,we create web page for the E-Commerce website.