Vous êtes sur la page 1sur 7

Computer System & Application Solution Q1 (a) i) ii) 1) 2) 3) State whether True or False: 1) False 2) True 3) False 4) False.

Answer the following in one sentences : Simple Mail Transfer Protocol Least amount of cabling of any topology and is easy to install. URL stands for Uniform Resource Locator and is a unique identifier for locating as item, such as a page of text or graphics, anywhere on the internet; the URL acts as the items address on internet. A blog (a contraction of term web log) is a type of website, usually maintained by an individual with regular entries of commentary, descriptions of events, or other material such as graphics or video. Entries are commonly displayed in reverse-chronological order.

4)

(b) i) Select the appropriate option from the following: 1) All of these 2) URL 3) WAN 4) FTP iii) Give difference between: Routers A router essentially determines which way is the shortest or fastest in a network, and routes packets accordingly. It works at layer 3 of the OSI model, moving packets from one port to another based on IP addresses. Server Based networks In this environment, users gain access to files, printers, and other network-based objects by obtaining rights and permissions given through a centrally controlled server.

Bridges A bridge connects one segment of LAN to another in a network permanently. It works at layer 1 and 2 of the OSI model.

Peer to Peer In a peer-to-peer network (abbreviated as P2PN) and sometimes called a work-group, all nodes on the network have equal relationship to all others

(c ) i)

1. To send mail from one user to another. 2. To search or browse for information. Any two layers of OSI (Application, Presentation, Session, Transport, Network, Data link, Physical).

ii)

Q2 (a) i) ii) State whether the following are True or False : 1) True 2) True 3) False 4) True Answer in one line each: 1) Internet Service Provider. 2) Availability refers to the ability to ensure that an e-commerce site continues to function as intended. 3) Non-repudiation refers to the ability to enure that e-commerce participants do not deny (i.e. repudiate) their online actions. 4) www.amazon.com

(b) i) ii) Select the appropriate option from the following: 1) Master and Visa 2) Integrity 3) None of the above 4) Credit Card Give one difference between each of the following: 1) Affiliate Revenue Model : In this model, sites that steer business to an affiliate receive a referral fee or percentage of the revenue from any resulting sales. Transaction fee Revenue Model: In this model, a company receives a fee for enabling or executing a transaction. For example, eBay.com created an online auction market place and receives a small transaction fee a seller if the seller is successful in selling the item. 2) B2C: This is Business to consumer e-commerce. It is defined as any business selling its product or services to consumers over the internet for their own use. B2B : This is Business to Business e-commerce, in which business focus on selling to other business, is the largest form of e-commerce. Q3 (a) i)

1) SELECT INO, ITNAME, QR, QS FROM STORE 2) SELECT ITNAME, QR-QS AS Quantity in balance FROM STORE. Explain use of the MySQL function :(1) MONTHNAME () :Returns back to character name of the month of the date argument. e.g. SELECT MONTHNAME(2010-06-10) will return back with answer as JUNE.

ii)

(2) LTRIM ():Returns back after removing all leading blank spaces of string type. iii) CREATE TABLE BILL ( CUST_ID VARCHAR(20) NOT NULL PRIMARY KEY, CUST_ADDR CHAR(50), ROOM_NO INT(3), TYPE CHAR(10) NOT NULL DEFAULT NON AC, NO_OF_DAYS INT(3) UNSIGNED );

(b)(i) (1) SELECT CNO,CNAME, MAX(BAMT),MIN(BAMT) FROM CUSTOMER GROUP BY CNO; (2) SELECT CNAME, COUNT(*) FROM CUSTOMER GROUP BY CNO HAVING BAMT<100000; (ii) SELECT A.BKNO, A.AUTHOR, B.RNO, B.ISSDT FROM LIBRARY A INNER JOIN READER B ON A.BKNO=B.BKNO AND A.TYPE=FICTION; (C) (i) (1) UPDATE PURCHASE SET AMT=AMT+50; (2) SELECT * FROM PURCHASE ORDER BY PURDT; (3) ALTER TABLE PURCHASE DROP ITEMDESC; (4) SELECT PRNO, AMT, 0.1*AMT AS VAT FROM PURCHASE; (ii) SELECT ENO, ENAME FROM TAX WHERE TAX < (SELECT AVG(TAX) FROM TAX); Q4 (a) (i) Printf() Printf: allowing you to format a string from components (i.e. taking results from variables), and when output to stdout, it DOES NOT append NEW LINE character. You have to do this by inserting \n in the format string. Puts() Generates line feed automatically And prints string data only.

Do while () In do while the statement are executed for the first time and then the condition are tested, if the condition turns out to be true then the statement are executed again.

While () In While loop the condition is tested first and then the statement are executed if the condition turns out to be true.

(ii) OUTPUT is 3204 Blank line 0.000000 (b) (i) (1) Keywords:- Keywords are the words whose meaning has already been explained to the C complier. Keywords are also known as Reserved words. (2) Every C word is classified as either a keyword or an identifier. These are defined by the users and are name given to various program element, such as Variables, Arrays and functions.

An identifier must begin with an alphabet or underscore. (ii) /*sum of series*/ #include<stdio.h> #include<math.h> main() { float s=0,I,j; for(i=1,j=12;i<=19,j<=30,i=i+2,j=j+2) { S=s+i/pow(j.2): } Printf(sum of series=%.2f/n,s); Return ;} (c) Break Break statement causes an immediate exit from the loop structure. It can also be used along with the switch statement to terminate the switch statement. Continue Continue statement bypasses the remaining statement of the loop and forces the next repetition of the loop to take place.

OR Q4 (a)(i) 1) True 2) True 3) False 4) False

(ii) (1) The purpose of the Dim statement is to allow the user to declare variables and named Constants. For e.g. Dim x as integer will declare a variable called x of type integer and reserve a memory location which can be referred by the name x. (2) int and string are two common data types in Visual Basic. (b) (i) (1)Val() and str() functions. The val() function is used to convert string values into numeric value and the str() function is used to convert numeric value into string value. (2) Property and Event. Property refers to a description of an object or that which shows the state of an object like Caption, Backcolor etc. Methods/function are for changing or doing something on the object like Move, Remove, Add,etc. Event implies that something happened for which the object must respond to. And for this very reason we write method like cmd_Click (ii) Object Type Form Label Property Name Caption Name Caption Setting frmOddeven Odd or Even lbl1 Enter a Number

Text Box Command Button

Name Text Name Caption

txt 1 Blank cmdRes Display Result

In the code when command button is clicked Private sub cmdRes_Click() Dim x as Integer X=Val(txt1.text) If x Mod 2=0 then MsgBox (The Number is Even) Else MsgBox(The Number is Odd) Endif End (There are also other alternatives available. You can use Label for displaying result or print statement instead of MsgBox.) (c) (i) A List Box Control allows the user to create and display a list of items which the user can choose from. (ii) Object Type Property Setting Form Name frmCalories Caption Calories Calculator Label Name lbl1 Caption Enter grams of Fat Label Name lbl2 Caption Enter grams of Carbohydrates Label Name lbl3 Caption Enter grams of Protein Label Name lbl4 Caption Enter the currency Amount Text Box Name txt1 Text Blank Text Box Name txt2 Text Blank Text Box Name txt3 Text Blank Command Button Name cmdRes Caption Calculate Calories label Name lblRes text Blank

In the code when command button is clicked Private Sub cmdRes_click() Dim tc as Integer tc=val(txt1)*9+val(txt2)*4+val(txt3)*4 lblRes.text = str(tc) End Sub Q5 (a) (i) The difference between simple Paste and Paste Special is that during paste special Excel allows the user to carry out certain addition operation such as addition or multiplication and so on. (ii) Answer the Following using spreadsheet A Name Gupta Suri Khan Jude Minaz B M1 76 54 72 87 54 C M2 63 49 69 73 49 D M3 78 48 66 84 28 E Average F Result

1 2 3 4 5 6

Steps: In cell E1 type the heading Average In cell F1 type the heading Remark

1) Select the Cell E2 and type the formulae as = AVERAGE (B2:D2) Or =sum(B2:D2)/2 2) Select the Cell E2 and drag the fill handle till Cell E35. 3) Select the Cell F2 and type the formulae as =IF (AND(E2>=50,B2>=40,C2>=40,D2>=40),PASS,FAIL) 4) Select the Cell F2 and drag the fill handle till cell F35.

(b) (i) Explain the use of the following function in spreadsheet 1) TRIM() Removes all spaces from text except for single space between words. Starting as well as ending blank space is removed. Except a single all other spaces between two words are also removed. 2) VLOOKUP() The VLOOKUP() function which stands for vertical lookup looks up value which have been given in a column and returns the corresponding value in the columns of a table based on the value given in the search column and the value to be returned.

(ii) 1 2 3 Steps:1) 2) 3) 4) In the Cell D1 type YEARS and in Cell E1 type DEP Value In the Cell D2 enter 1 and Auto fill, incrementing values up to D11. In the Cell E2 type the formulae =$A$2-D11*$B$2 Click on the Fill handle of Cell E2 and drag up to cell E11. A COST 200000 B SCRAP VALUE 10000 C LIFE 10 D YEARS E DEP VALUE

(c ) (i) Two spreadsheets are said to be linked when the formula in one sheet refers to cell in the other sheets. In this manner data can be stored in two separate sheets but they can refer to one another. The advantage is that whenever data from one sheet is updated the data in the linked sheet gets updated automatically. (ii) 1. In the cell C1 type the heading Commission and in Cell D1 type Incentive 2. In Cell C2 type the formula = IF (B2<100000,B2*2%,100000*2%+(B2-100000)*3%) 3. Click on the Fill handle of cell C2 and Drag up to Cell C51. 4. In Cell D2 type the formula =IF(B2>250000,0.5%*(B2-250000),0) 5. Click on the Fill handle of Cell D2 and drag up to Cell D51.

Vous aimerez peut-être aussi