IT430 – E—Commerce: Midterm Important Subjective (25 Solved Q&As)
Information Technology • Read every solved subjective question with its model answer directly on this page. Free, no login required.
All 664 Midterm Packs · IT430 Course Page · IT430 MCQ Pack (124 MCQs)
-
What is e-commerce? Discuss its major types.
Topic: E-Commerce and E-Business Fundamentals
E-commerce is the process of buying, selling or exchanging products, services or information via computer networks, including the internet. Its major types are: (1) Business-to-Business (B2B) — transactions between two businesses, e.g. a manufacturer selling to a wholesaler; (2) Business-to-Consumer (B2C) — a business sells directly to individual consumers, e.g. an online store; (3) Consumer-to-Consumer (C2C) — consumers sell to other consumers, e.g. online auction sites; (4) Consumer-to-Business (C2B) — a consumer offers products or services to businesses, e.g. a freelancer offering services to companies.
-
What is a computer network? Differentiate between LAN, MAN and WAN.
Topic: Internet, Networks and Protocols
A computer network is a collection of computers and devices connected together so that they can communicate and share data and resources. A LAN (Local Area Network) covers a small area such as one office or building and is usually privately owned. A MAN (Metropolitan Area Network) covers a city or a large campus and connects several LANs within that area. A WAN (Wide Area Network) covers a large geographical area, often a country or the whole world; the internet is the largest example of a WAN. LANs generally offer higher speeds, while WANs are slower and use public transmission media.
-
What is an IP address? How many networks and hosts are possible in Class A, B and C?
Topic: Internet, Networks and Protocols
An IP address is a unique logical address assigned to every machine on a TCP/IP network; the IPv4 address is 32 bits long and is written in dotted decimal notation. In classful addressing: Class A uses 8 bits for the network part — 126 networks are possible (0 and 127 are reserved) and each network can have about 16.7 million hosts. Class B uses 16 bits for the network part — 16,384 networks are possible, each with 65,534 hosts; its first octet ranges from 128 to 191. Class C uses 24 bits for the network part — about 2 million networks are possible, each with 254 hosts; its first octet ranges from 192 to 223.
-
What is subnetting? How does a router help in dividing a network into subnets?
Topic: Internet, Networks and Protocols
Subnetting is the process of dividing one large network into smaller logical segments called subnets, on the basis of IP addresses. It improves network management, reduces traffic congestion and makes better use of the address space. A router performs this division: it connects the subnets together, examines the destination IP address of each packet and forwards the packet to the correct subnet. Because a router works at the network layer and uses logical (IP) addressing, it can separate a large network into subnets and control the flow of traffic between them.
-
Differentiate between a bridge, a switch and a router.
Topic: Internet, Networks and Protocols
A bridge connects two similar LAN segments and works at the data link layer, forwarding frames on the basis of MAC addresses. A switch is a multi-port bridge: it connects several devices or segments, learns the MAC address attached to each port and forwards a frame only to the port where the destination device is attached, which reduces unnecessary traffic. A router connects different networks together and works at the network layer; it forwards packets on the basis of logical IP addresses and can choose the best path for a packet. Thus bridges and switches work within a network using physical addresses, while routers work between networks using logical addresses.
-
What is the Domain Name System (DNS)? Why is it needed?
Topic: Internet, Networks and Protocols
The Domain Name System (DNS) is a distributed naming system that translates human-friendly domain names, such as www.vu.edu.pk, into the numeric IP addresses that computers use to locate one another on the internet. It is needed because users can easily remember names, whereas machines communicate using IP addresses. When a user types a domain name in the browser, a DNS server is queried; it returns the corresponding IP address, and the browser then connects to that address. A domain name consists of labels separated by dots, read from the most specific (host) to the most general (top-level domain such as .com, .edu or .pk).
-
Explain how electronic mail works. Also differentiate between SMTP, POP3 and IMAP.
Topic: Internet, Networks and Protocols
In electronic mail, the sender composes a message in a mail client and sends it to the outgoing mail server, which forwards it across the internet to the receiver's mail server, where it is stored in the receiver's mailbox until the receiver retrieves it. SMTP (Simple Mail Transfer Protocol) is used for sending mail from the client to the server and between servers. POP3 (Post Office Protocol version 3) is used by the client to download messages from the server onto the client machine, after which the messages are usually removed from the server. IMAP (Internet Message Access Protocol) also retrieves messages but keeps them stored on the server, so the user can access and manage the same mailbox from different machines.
-
What is HTML? Describe the basic structure of an HTML document.
Topic: HTML and Web Page Design
HTML (Hyper Text Markup Language) is the standard markup language used to create web pages. It is a language of tags — special keywords enclosed in angular brackets — which tell the browser how to display the content. A basic HTML document has two main parts enclosed in the <html> tag: the head section, enclosed in <head> tags, which contains information about the document such as its title given with the <title> tag; and the body section, enclosed in <body> tags, which contains the actual content displayed on the page, such as headings, paragraphs, links, images and tables.
-
What are frames in HTML? Write the values of the target attribute and their functions.
Topic: HTML and Web Page Design
Frames allow a browser window to be divided into several sections or panes, where each pane can display a separate HTML document, so that one part of the page (e.g. a menu) remains in view while another part changes. The target attribute of a link specifies in which frame or window the linked document will open. Its values are: _blank — opens the document in a new window or tab; _self — opens it in the same frame where the link was clicked (this is the default if the target attribute is left out); _parent — opens it in the parent frame; and _top — opens it in the full body of the window, replacing all frames.
-
What are style sheets? Describe the three methods of using style sheets with a web page.
Topic: CSS and Style Sheets
Style sheets (CSS — Cascading Style Sheets) are used to define the presentation and look of HTML elements, such as fonts, colors, margins and positioning, separately from the content. There are three methods of using them: (1) Inline — the style attribute is written inside an individual HTML tag, and it applies to that element only; (2) Embedded (document level) — style definitions are written inside <style> tags in the head section of the page, and they apply to the whole page; (3) External — all style definitions are written in a separate plain text file with a .css extension, which is linked to the pages through the <link> tag in the head section, so one file can control the look of an entire web site.
-
What is the difference between margin and padding in CSS? Also explain the order in which border-width values are applied.
Topic: CSS and Style Sheets
Padding is the space between the content of an element and its border, i.e. the inner space, whereas margin is the space outside the border, i.e. the distance between the element and the neighbouring elements. When the border-width property is given with four values, they are applied in the clockwise order: border-top-width, border-right-width, border-bottom-width and border-left-width. The same top, right, bottom, left order is used for border-style, margin and padding shorthand properties.
-
What is JavaScript? Write its salient features and data types.
Topic: JavaScript and Client-Side Scripting
JavaScript is a lightweight, interpreted scripting language that is embedded in HTML pages and runs in the user's browser, making web pages interactive and dynamic — for example, validating form data, responding to user events and changing page content without reloading. Its salient features are: it is a client-side language, it is case sensitive, it is loosely typed (a variable can hold any type of value), and it supports objects and arrays. The data types used in JavaScript include String (text values), Number (numeric values, both integers and floating point), Boolean (true/false), Null (no value) and Undefined, along with Objects and Arrays.
-
What is an array in JavaScript? How is an array element accessed? Also write the role of a constructor function.
Topic: JavaScript and Client-Side Scripting
An array in JavaScript is an object that can store multiple values under a single variable name. Each value is stored at a numbered position called an index, and indexing starts from 0. An element is accessed by writing the array name followed by the index in square brackets, e.g. myArray[3] gives the fourth element of the array myArray. A constructor is the initializing function used to create an instance or copy of an object: when an object is created with the 'new' keyword, the constructor function runs and initializes the object's properties with the values passed to it.
-
What is XML? How does it differ from HTML?
Topic: XML, Server-Side Processing and Web Architecture
XML (eXtensible Markup Language) is a markup language designed to store and transport data in a structured, self-descriptive form. Every XML document starts with a declaration such as <?xml version="1.0"?>, and all the elements are enclosed inside a single root element. XML differs from HTML in that HTML is designed to display data and uses predefined tags, whereas XML is designed to describe and carry data and allows the author to define his own tags. XML is case sensitive, requires every opened tag to be properly closed and nested, and focuses on what the data is rather than how it looks.
-
Differentiate between client-side and server-side processing.
Topic: XML, Server-Side Processing and Web Architecture
In client-side processing, the processing of data takes place on the user's own computer in the browser; scripts written in languages such as JavaScript are downloaded with the web page and executed by the browser. It is fast and reduces load on the server, but the code is visible to the user and cannot directly access server databases. In server-side processing, the request is sent to the web server, where scripts written in technologies such as ASP, JSP or PHP are executed; the server processes the data, may access databases, and sends back only the resulting HTML page to the browser. It is more secure and powerful, but increases the load and response time of the server.
-
What are applets and CGI scripts? Write any three differences between them.
Topic: XML, Server-Side Processing and Web Architecture
An applet is a small compiled Java program that is sent from the server to the browser and is executed on the client machine inside the web page, using the <applet> tag to call the applet code. CGI (Common Gateway Interface) is a standard way for a web server to run programs on the server side: when a request comes, the server executes the CGI script, and the output produced is sent back to the browser as a web page. Differences: (1) applets are processed on the client side, while CGI scripts are processed on the server side; (2) applets are written in Java and downloaded to the browser, while CGI scripts can be written in languages such as Perl, C or PHP and stay on the server; (3) applets can provide a rich interactive interface within the page, while CGI scripts mainly generate dynamic page content in response to user input.
-
Why is HTTP called a stateless protocol? How can state be maintained in a stateless environment?
Topic: XML, Server-Side Processing and Web Architecture
HTTP is called stateless because the server does not remember any information about previous requests: each request from a client is treated as an independent transaction, and the connection is closed after the response. State can be maintained in the following ways: (1) Cookies — small pieces of information stored on the client side by the browser and sent back to the server with each request, identifying the user across steps; (2) Server-side temporary files or sessions — a temporary file or session record is created on the server with a common ID, and the information of each step (registration, add to cart, confirm order) is stored against that ID; (3) Hidden form fields or URL rewriting — the state information is carried from one page to the next inside the forms or the URL itself.
-
What are cookies? How are they useful in an e-commerce transaction?
Topic: XML, Server-Side Processing and Web Architecture
A cookie is a small piece of data that a web server sends to the user's browser, which stores it on the user's computer and sends it back to the server with every subsequent request to the same site. Cookies are useful in an e-commerce transaction because HTTP is stateless: a cookie can identify the user and link the different steps of a transaction — registration, selection of items (add to cart) and confirmation of the order — so the site remembers the contents of the shopping cart and the user's preferences as the user moves from page to page. Cookies may be temporary (session cookies, deleted when the browser is closed) or persistent (stored for a defined period).
-
Differentiate between two-tier and n-tier architecture.
Topic: XML, Server-Side Processing and Web Architecture
In two-tier architecture, the system is divided into two layers: the client tier, which runs the user interface and presentation logic, and the server tier, which manages the data and business logic; the client communicates directly with the server. In n-tier architecture, the work is divided into more layers — typically a presentation tier, an application or business logic tier, and a data tier, and possibly more — where each tier performs a specific function and communicates with the neighbouring tiers. N-tier architecture is more scalable, flexible and easier to maintain than two-tier architecture, because a change in one tier does not require changes in all the others.
-
What is a firewall? Describe its three main types.
Topic: Security, Firewalls and Cryptography
A firewall is a combination of hardware and software that sits between the internet and the internal network of an organization to protect the network from outside attack. It examines the data entering or leaving the network and filters it according to certain rules. Its three main types are: (1) Packet filter firewall — the simplest type; it applies a set of rules to each incoming and outgoing packet (e.g. based on IP addresses) and allows or blocks it; it operates at the data link and network layers of the OSI model. (2) Circuit level firewall — similar to packet filtering but operates at the transport layer, so it has greater functionality and verifies the connection handshake. (3) Application level (proxy) firewall — operates at the application layer; it acts as an intermediary between the internal users and the internet and inspects the actual content of the traffic for specific applications.
-
What is cryptography? Differentiate between symmetric and asymmetric cryptography.
Topic: Security, Firewalls and Cryptography
Cryptography is a collection of mathematical techniques used to ensure the confidentiality of information. The process of scrambling a message with the help of a key is called encryption, and the process of unscrambling it using an appropriate key is called decryption. In symmetric cryptography, the same key is used for both encryption and decryption, so the key must be shared secretly between the sender and the receiver; it is fast but key distribution is a problem. In asymmetric cryptography, also called public key cryptography, a pair of keys is used: a public key, which can be shared with everyone and is used for encryption, and a private key, which is kept secret and is used for decryption. Whatever is encrypted with one key can only be decrypted with the other key of the pair.
-
What is a digital signature? What three assurances does it provide?
Topic: Security, Firewalls and Cryptography
A digital (electronic) signature means any letters, numbers, symbols, images, characters or any combination thereof in electronic form applied to an electronic document which can ensure its authenticity, integrity and non-repudiation. It is created by encrypting a digest of the document with the sender's private key; anyone can verify it using the sender's public key. It provides three assurances: (1) Authenticity — the receiver is sure of the identity of the sender; (2) Integrity — the document has not been altered during transmission, otherwise the signature will not verify; (3) Non-repudiation — the sender cannot later deny having signed and sent the document.
-
Differentiate between a virus, a worm and a Trojan horse.
Topic: Security, Firewalls and Cryptography
A virus is a malicious program that attaches itself to a host file or program and spreads when that file is executed; it needs human action, such as opening an infected attachment or running an infected program, to execute and spread. A worm is a self-replicating malicious program that travels independently across networks from one computer to another without attaching itself to a host file and without needing human action. A Trojan horse is a program that appears to be useful or harmless but secretly performs malicious actions, such as stealing data or opening a back door; it does not replicate itself but tricks the user into installing and running it.
-
What is a Denial of Service (DoS) attack? How does it affect a web server?
Topic: Security, Firewalls and Cryptography
A Denial of Service (DoS) attack is an attack in which the attacker floods a network service or a web server with a very large number of invalid or useless requests, so that the server's resources are exhausted. For example, if a web server is bombarded with thousands of HTTP requests, it becomes too busy dealing with the fake requests and is unable to respond to the requests of legitimate users. As a result, the web site becomes very slow or completely unavailable, which can cause serious loss to an e-commerce business. When the attack is launched from many compromised computers at the same time, it is called a Distributed Denial of Service (DDoS) attack.
-
Why is security considered the biggest factor slowing down the growth of e-commerce? Discuss briefly.
Topic: Security, Firewalls and Cryptography
Security is considered the biggest factor slowing down the growth of e-commerce worldwide because online transactions require customers to send sensitive information, such as credit card numbers and personal data, over a public network. Customers fear that this information may be intercepted, stolen or misused, and businesses fear attacks such as hacking, viruses and denial of service. This lack of trust discourages many people from buying online. To build trust, e-commerce sites use technologies such as firewalls, encryption through cryptography, digital certificates and secure payment systems, so that customers feel their information and payments are protected.