Practice Paper of

Informatics
Practices (065) for
XII Board Exam
2014

Delhi Public School, Ranchi
SAI L Tow ns hip Developed & Designed by
Ranchi 834 004
+91-9470932544 (Cell) DR. SRIKUMAR MUKHERJEE
+91-9097536204 (Off)
1/3/2014 (Teacher, Dept. of Computers,
DPS, Ranchi)

“Systematic organization of habits and
instincts with purpose of fulfilling the
becoming of life, by graduated active
manipulation of behavior may be called –
Education.” [NP Vol-3]

even it is not asked. it must be precise and to the point. take couple of deep breaths concentrating your mind.Instructions for using this practice paper and preparation for writings of the answers:  This is designed according to the text book taught in the class. Before leaving Exam Hall do RE-CHECK all the answer papers properly within 5 min. Don't waste the time for the question about which you are in doubt. before you start to answer the next question in the examination hall. 2 & 3 should have example(s). .  Finally also take help form the sample paper of the market. important questions have been prepared. chapter wise. Draw „Line of Separation‟ end of each answer by dark PENCIL and keep 1-2 lines gap. Theory based programming answers of Qs 1.  After ending each chapter also find the questions given at the end of the chapter.  First read / browse a chapter then go through the questions to find the answer of this paper. Error finding must be Re-written in the form of full corrected program with underlined the corrected places of the corrected re-written program and commenting on the „errors‟. and make a plan to answer. Example is must. What to do in the examination hall? Just after getting the question paper. Theory answers must not be unnecessarily too long. Outputs must be written just as it is viewed in console-display.  Page wise. . As far as possible attempt the questions in the serial order. Read the question paper properly. Be careful of error findings & outputs. Complete your all answers within 2hrs 15min and use rest 35-40 min to revise your papers.

URL (n) Differentiate: Domain Name & URL (o) . MAN. ETHERNET CABLE. www. Bridge .067.indoaryan. . Optical fiber cable. Pentium “F00F” Bug . .002 . Suggest an economic way to connect it. 6) How do the web address is practically used in the net? Write the format of the same. Coaxial cable.org . . MAC address . iii) Suggest the placement of the following devices with justification: 1) Router 2) Switch / Hub iv) The company is planning to link its head office situated in India with the offices at Reliance. .876. ii) Suggest the most suitable wing to house the server of this company with a suitable reason. TELEPHONE CABLE.e. Ping Flooding . Suggest the best wired communication link with a very Sri Ram Building 78 high speed connectivity from the following : i) Telephone Analog Line ii) Ethernet Cable iii) Optical Fiber A company in Micro Excel has 4 wings of buildings as shown in the diagram: Center to center distances between various Buildings: W3 to W1 50m W1 to W2 60m W1 W2 to W4 25m W2 W4 to W3 170m W3 to W2 125m W1 to w4 90m Number of computers in each of the wing: W1 150 W4 W2 15 W3 W3 15 W4 25 Computers in each wing are net worked but wings are not networked.com .indoaryan.net . Tree Topology .org . Hub . NIU (d) Ring Topology . COAXIAL CABLE. WiFi (k) Modem . TAP . 11) There is a group presentation of two professors with their Palm Tops connected through Bluetooth. OPTICAL FIBER. Hub . Danial of Service Attack or DoS Attack (r) SYN Fooding . www. i) Suggest a most suitable cable layout of the connection between the wings. (c) Node .010) and web address (i. 239. Repeater .994. with a Number of computers are : suitable reason. Ethernet cable (g) Wireless Networking (h) Microwave. Server . (3) Short answer type question: [2 or 3 marks for each] 1) Which protocol is used to move Hyper Text document and simple file transferring through networks in wide area scale? 2) Which protocol will you use to transfer a file from the remote location? 3) Which transmission medium should be used to transfer data across two continents at very high speed? 4) How can you increase to signals between two networks if it is going down? 5) How the Indian languages are getting included in the application of computers easily? Name four such languages. [Question# 1] NETWORKING & OPEN SOURCE SOFTWARE [TOTAL MARKS 10] (1) Define / Make a short note of the followings (Computer Networking): [1-2 / 2-3 marks of each] (a) Computer Network (b) PAN. Radio wave. Mesh Topology (e) Data Communication (f) Twist Pair Cable . Bus Topology. TCP/IP . Satellite. Gateway .org)? 8) Arrange the followings in ascending order according to their data transmission rate. How do make her understand about the differences? 10) Which of the following is not a characteristic of Open Source Software: (i) There is a company owner (ii) Can be downloaded freely (iii) Source code is available for modification. WAN.edu . FTP . Star Topology . HTML . the company is ready to compromise on the speed of connectivity. Which of the following networks they are using: W AN LAN PAN MAN 12) How do you differentiate the OSS and Proprietary software in terms of customizability of the software? 13) Arrange the following communication channels in ascending order of their data transmission rates.004. 9) Sujata had some confusion between Domain name and URL. 7) Is there any difference between an IP address (i. SMTP (2) Excel Industries has set up its new center at Lucknow for its office and web based activities. Router (l) IP address . Justify your answer.gov (p) Network security . LAN . TearDrop / New Tear (s) HTTP . Threat to Network (q) Firewall . KGN Building 158 (g3) Suggest the placement of the following devices with reasons : Krishna Building 125 i) Repeater ii) Hub Switch (g4) The Institute is planning to link its International office situated in Sai Building 200 New Delhi. Ethernet card. Workstation. . (g2) Suggest the most suitable place to house the server. Domain name (m) Define: 023. (i) Infrared Communication (j) Bluetooth . IDS . Snooping . The company compound has four building as shown in the diagram below : Sa i The distance between various buildings Sri Ra m are : Bu ild ing Bu ild ing KGN to Sri Ram 65m Sri Ram to Sai 195m Sai to Krishna 205m KGN Krishna Krishna to KGN 200m Building Building KGN to Sai 195m Sri Ram to Krishnal 325m (g1) Suggest the cable layout of connections between the buildings.e. The company has now decided to connect the wings also.

PHOTOSHOP. & import javax. while(i<5) { s+=I .swing. f) Why do you use import javax.i++)? u) Rashmi in her desktop application wanted to show her friend‟s names in the List Box and their city names in the Combo Box. System. (d) Shareware.JOptionPane ? Describe the two applications of JOptionPane class of the package javax. public .System.println(“Value of x & y=> ”+ x + “ ” + y.out.sqrt() (2) Math. oo) Write the use & Output of the following Library Functions from MATH class: (1) Math.7) (9) Math.DefaultListModel. kk) When a called method is called as void type and other data types? What do you understand value returned? ll) Explain scope of variables in terms of Local and Global variables.swing.max() (7) Math.valueOf(x)). Which property of the List Box and Combo Box will she use to do her jobs? v) When do you import javax.getSelectedItem() (ii) isSelected() & setSelected() (iii) Text1.setText(String. (j) GNU. int y=Integer. (FILE -> Open -> main.print(“ ” +s). r) In a Java application using Net Beans IDE. (k) Tomcat. System. jLabel1.MessageDialog( ) and JOptionPane. (b) Open source software. dd)Object of which class do you create when you are working with inheritance? Write the advantages of inheritance. but can‟t.min() (8) Math. (ii) (int k=10) & (int k==10) m) What is use of default in switch…. i++ . int b=3.print(“ ”+x) . (n) Pango. d) Write the function of toString() method. } System. now he wants to edit it. MS WINDOWS 7. String y=”Existentialism” . the user views the data on the Text Fields.println(“Value of a & b=> ”+ a + “ ” + b. What was done by the programmer that does not allow the user to edit his name? s) How do you enable the jLabel1? t) How do you insert values into the TextArea? Write the syntax in terms of inputing value of i: for(i=1. (o) PHP. (s) UNICODE (t) ASCII code (u) Name 2 sites of OSS. for(x=0 .swing.setFont() (iv) getText() & setText() (v) getSelectedIndex() & getSelectedValue() (vi) addElement() & insertElementAt() (vii) removeAllElements() & removeElementAt() (viii) remove() & clear() (xi) getModel() & setModel() (x) isEnabled() & setEnabled() (xi) JOptionPane.parseInt(x) .exe) ii) What is purpose of user defined method? How do you pass parameters/arguments to a method? jj) Explain methods call by value and call by reference . (l) MySQL. (m) Front-End & Back-End. (f) \b & \r . (q) Python. nn) Write the use & Output of the following STRING Library Functions: (1) contact( ) (2) Length( ) (3) substring( ) (4) toLowerCase() (5) toUpperCase() (6) Trim() (7) String x=”Indoaryan” .678) pp)What is the use of new operator during creation of an object (instantination) of a class? qq)What is a class? Explain the function of a constructor in a class? rr) How does an inherited class use the parent class? ss) How many kinds of Parent and Child class relationships can you mention? tt) How do private . } while (i<5) . i=4 . 14) Which of the following software‟s are open source: LINUX.. (i) OSI. a++. he found that – his name is misspelled. i) How do you insert single lined and multiple lines comments? j) What are the members of Java Tokens? k) Differentiate: (a) Identifiers & Keywords .cell() (4) Math.101 . . gg) What are ODBC and JDBC ? hh) Write down the steps to create Menu & Sub-Menu.InputDialog( ) z) What is swing control? (Z..case statement? When do you use break in switch…. .getSelectedValue() & String x = (String) jComboBox1.round() (6) Math.print(“ ” +s).round(78.pow() (5) Math. MYSQL (4) Define / Make a short note of the followings (OSS): [1-2 / 2-3 marks of each] (a) Free software.3) (10) Math. (d) Logical & Relational operators. (b) Primitive & Reference Datatype . x=x. ee)How many times the following loops will run? Which one of these is entry control and which one is exit control? Show the outputs: (A) int s=0 .abs() (3) Math.sin(30) (11) Math. [ Question# 2 ] Java (with IDE) + HTML & XML [TOTAL MARKS 10] (1) a) Explain How and when do you use getText() & setText() methods? b) Differentiate of its‟ applications: isEditable() & isEnabled() c) Write the use of valueOf() method and output of the statement: float x=999. (B) int s=0 . mm) Write a function that will take length and breadth of a rectangle as parameters and return the area of the rectangle.DefaultComboBoxModel. (g) / & % operators l) Differentiate: (i) int x=10 & final int y=10. e) What is a wrapper class? Explain the following in terms of wrapper class: String x=”12345”.floor(12. ff) What are the final values of: (A) int x . aa)What is ButtonGroup? How does it effect to select a Radio Button? bb)How does the Model contain the data to be taken from a list of data? cc) What is the concept of OOP in terms of Class and Object? Write the syntax of the object creation. do { s+=i .out.pow(2. System.i<=10. (c) Freeware. (e) \t & \n .1) Write the output of x in the following case:> int x = (5>=8) ? 1 : 2. x<10 .swing g) Which swing components does javax.out.case? n) What are pre and post increments? Can you explain pre & post decrement also with example? o) What will happen if you run a break statement in for loop? When do you use for loop? p) How do you differentiate the applications of: while and do……while statements? q) What are exit-control and entry-control looping statements? Explain with example. (e) Source code.contact(y) .out. do{++b + b++. (c) Local & Instance(object) variable . int y=1 .out. y) Differentiate: (i) String x = (String) jList1.swing. ++x) y = x++ . i++ . (f) FLOSS. i=4 . protected & default accessibility of variables and methods of a class can work? uu)What is the use of an object? How do you call a method add() which is declared and defined in the child class? vv) Differentiate: Method-Overloading and Method-Overriding with examples.} while(b<=12) . (p) Open Office. (r) Firmware. (B) int a=2. (h) W3C. a=++a .JPanel container contain? h) Write the application of the method getPassword() with a right example. (b) FSF.setForeground() & Text1.-y . ? w) What is Panel Container? In which package does it stay? x) When do you use Check Box and Radio Button? Establish the relation between the use/application of Radio Button and Combo Box.

(int x. getDriver() . (2) Write the answer of the following based on HTML & XML: a) Write down the differences of HTML and XML. “1” ) element in <OL> tag? aa) What is the use of START element in <OL> tag? bb) What are the different types of bulletes can be used in <OL> tag? cc) What is use of VALUE element in <LI> tag? dd) Explain with example nesting tag OR tags within tag? ee) What is the HTML code for the following outputs (the Hyperlinks are indus. BACKGROUND .) just after it defined. But while she runs the program. by implementing the method in a sub-class (inherited) of the same? bbb) What is Front-End Back-End connectivity? Write the application of JDBC and ODBC in 3Gl-4GL connectivity? ccc) Write about JDBC-ODBC Bridge. x) What are uses of the followig in terms of HR tag: ALIGN . VLINK . What is JDBC Api? ddd) How does JDBC driver work for MySQL? eee) Write the statement (syntax) that makes driver loaded to establish connection between Java and MySQL? fff) Write the statement (syntax) that makes the connection between Java and MySQL? ggg) How can you run a SQL Command in a Java program. getLong() . W IDTH (in %age). COLOR . v) Which of the tags : <H6> or <H1> gives a bigger size heading? w) What is <HR> tag? Write the different elements/attributes of HR tag. ww) Radha created a method add() in a super class named myclass and she also made another method of the same name [ add() ] declared in the child class yourclass of myclass. “a” . 2 t) How do you display H2SO4 & (A+B) in a HTML page? u) What are the different levels of Heading tags? Give example. getLoginTimeout() . ALINK l) Write the differences of LEFTMARGINE and TOPMARGINE m) Write the elements / attributes of FONT tag. y) Answer the following in terms of LIST tags: (a) <UL> (b) <OL> (c) <LI> (d) <DT> (e) <DL> (f) <DD> (g) <DIR> (h) <MENU> z) What is the use of TYPE (“A” . i) Wrte the function of HEAD and TITLE tags. has no instantiation of objects (no objects created) and there is a method created inside has no implementation and terminated with a semicolon ( . setRowCount() . previous() . d) Which tag in HTML will Subroto use place his photograph in the back ground of his web page? How will he use it? e) What are the different four levels of HTML tags? f) What is the file extention of a HTML code to be saved in a word processor? What type of file does it create? g) What are the fundamental / document tags of HTML? h) What are container tag and empty tag? Explain with examples. LINK . Economy 3. explain with an example? zz) Explain the interface of class with an example. executeQuery() . n) Write the functions of: FACE . “I” . Now how Rathin does fill the gap of not implementation of the method. Education  Industry 3. first() . <INPUT TYPE=”Text”> . aaa) Rathin has created a class. “i” . b) Write mail 2 advantages of XML over HTML. WIDTH (in Number) .html & agre. c) Expand the term HTML and it‟s function. method of the parent class does not run. Education 4. NOSHADE . getRowCount() . j) Write the different elements / attributes of BODY tag. SIZE o) What is BASEFONT? p) Differentiate between <BASEFONT> and <FONT> tag? q) How do you use the following tags? Give suitable examples to explain: (i) commsent (ii) paragraph (iii) center r) Explain the uses of the following HTML text tags with example: s) (a) <BR> (b) <P> (c) <B> (d) <I> (e) <U> (f) <STRIKE> (g) <SUP> (h) <SUB> (i) <TT> (j) <BIG> (k) <SMALL> (l) <BIG> (m) <STRONG> (n) <FORM> (o) <METHOD> (p) <MAILTO> (q) <RESET> (r) <SUBMIT> . k) Explain the function of the followings: BGCOLOR . Will Satya get success to run these three methods consecutively? If so explain how? yy) What is an Abstract Class? How do you use it.html): INDIA INDIA 1. that is written for database connectivity? hhh) Give the functions of: getConnection() . String k) & (double i. <INPUT TYPE=”submit” VALUE=”Submit Order”> . Education . executeUpdate() . but method of child class does run? What is the reason behind it? Can she run the method of the super class? If yes then how? xx) Satya created three methods of the same name Calc_Val() in a class and called the three methods one by one with three different sets of parameters/arguments such as (int a) . Economy 2. long j. char p). removeRow() . Economy 1. Health  Agriculture INDIA INDIA 1. TEXT . Economy  Industry  Industry  Agriculture  Agriculture 2.

ALT . Link colour should be “YELLOW”.htm”  Biospare pullution is “biospare. Bottom message should be centre aligned and the font size as “2” (4) Special Notes of the following Web Page : a. II.htm”  Soil pollution page is “soil. The message “Adapt Scientific Way Of Life To Be and Become!!!” should be displayed in “MAROON” colour. I.htm”  Result page is “result. . Visited link colour be “Blue” and Acti ve link colour be “Red” h. h. Logo used in the page on the top corner should be from a file “Sclogo.HTML” Poster Exhibition “Postering. What are the elements/attributes of <IMG SRC> tag? IV. Background colour should be “Yellow” c. Pages are linked with :  The main page is “home. Title of the page is : “People‟s Science Club” b. How do you insert an image in a web page? Write the HTML tag to display school. Text colour of the main heading should be: “BLUE”.HTML” Symposium “Symposium. Font face of the whole page will be: “TOHAMA”. Write the most useful TWO attributes in <IMG SRC> tag? V. Pages Linked with: Environment Awareness “Environment.html” f. i.gif” e. HEIGHT . Explain the NAME attribute of anchor tag.gif” e.HTML” Literacy Movement “Literacy. BORDER elements in image tag? VI. The background color of the page will be: “SILVER”. (3) Write the suitable HTML code to get the following outputs ” a. Title of the page should be “Global Warming” b.HTML” Health & Hygiene “Health_hygiene. f.jpg. What are the functions of: ALIGN . Image of the pollution is “warming. d.HTML” Model Exhibitions “Modeling.html”  Contact page is “contact. IMG SRC is an empty or container tag? III. c. WIDTH .htm”  Water pollution page is “water. The bottom message should be with size as “2”. visited link will be “GREEN” and active link will be “BLACK” in colour. Text font should be “Dauphin” d.HTML” g.

Background colour should be “Yellow”  Himachal Dekho c.htm” (d) Rajasthan Dekho as “Raj. Object Oriented [3X2] i) What will be value of the cardinality if you add 3 rows to a table of existing 5 records? [1] j) Draw and explain the relationship of: (a) One-to-one. CANDIDATE KEY .theindianschoolonline. Pages are linked with : Create your email ID on: www. v) How do you make any change permanent in Database? w) Differentiate the uses of: DROP & DELETE.com f. Title of the page should be “Bharat Darshan”  Kerala Dekho b.1200 and Rs. (g) Entity. ARTHIMETICAL . mess and Transport are Rs. PRIMARY KEY . TCL . [3] p) Write the uses of GROUP BY and ORDER BY clauses. 1000 respectively.htm” g.htm” (c) GOA Dekho as “Goa. [3] e) With diagram describe the different components of Database. PRIMARY KEY . 500. 2. (d) Field or Attribute (e) Degree. The students can avail certain optional facilities. [2] k) What is client-server system? Explain 2-tyre and 3-tyre system. Write a method that calculates (in ButtonCalc) the charges per session (3 months). one in computers and the other in Commerce. many-many) of data relationships. DATE): A. Image of the Indian map from the file  Rajasthan Dekho “MapOfIndia.htm” (b) Himachal Dekho as “Him. The Basic Interface for accepting details of facilities availed by a student are as given under: Write the code and event methods for incorporating the following functionality: Assume that the charges for library. Active link colour be “Red” i. Hierarchical . (f) Cardinality. (c) Touple or row. [1 . UNIQUE . Network . DCL . Query command. for the facilities availed including registration fees Rs.gif” e. (b) One-to-many.(5) Bharat Darshan a. (i) CONCAT() (ii) INSTR() (iii) SUBSTR() (iv) LEFT() (v) RIGHT() (vi) TRIM() (vii) LTRIM() / RTRIM() B. Write the USE and OUTPUT of the following library functions (STRING . [3] f) What are problems of Data Redundancy and Data Inconsistency? [2] g) What is Cartesian Product? Give example. Rs. ALTERNATIVE KEY [1x4] d) Describe different 3 types (1-1 . 1-many . Bottom message should be centre aligned and the font size as “2” [Question# 3] RDBMS with MySQL [TOTAL MARKS 10] (1) RDBMS: a) Define: (a) Relation.2 marks for each] b) Difine: DDL . [1] h) Define Data Models: Relational . CHEQUE . write its‟ types? What is Alias using queries on multiple tables? Give example. Visited link colour be “Blue” and h.500. DML . [1X5] c) Define the following KEYs: FOREIGN KEY . (b) Attribute or column. [2] n) Write the use of these constraints: NOT NULL . (b) Many-to-many. (a) Kerala Dekho as “Keral. (i) DATE() (ii) CURDATE() (iii) NOW() (iv) YEAR() (v) DAYOFMONTH() (vi) MONTHNAME() (vii) MONTH() (viii) DAYNAME() (ix) SYSDATE() [Question# 4] Java (with IDE) [TOTAL MARKS 15] (1) NDPS offers two crash courses. Text font should be “Dauphin”  GOA Dekho d. [2] l) In a query what is the use of “_ _a%” ? [1] m) How do you create a Foreign Key (REGNO) in table (CLASS) to make relationship with a Master/Parent table (STUDENT)? Also write the basic factors to select a field as the Key field (Primary/Foreign). (i) ROUND() (ii) POWER() / POW() (iii) TRUNCATE() C. DEFAULT [2] o) What is joining of tables. Let course fees for MCA and MBA per . [2] q) How can you restrict user to enter duplicate values in a field? r) Differentiate: (i) ALTER & UPDATE tables [2] s) Differentiate: (i) Equi Join & Non-Equi Join [2X2] t) Define: COMMIT ROLLBACK SAVEPOINT [3] u) What is group function? Give two examples.

10 or 15 years. 5000 + 20% of amount exceeding Rs. educational tax. education tax . When the form loads text boxes for income tax.session are: 15000 and 20000 respectively. He assigned his software programmer to design a „calculator‟ which will calculate the compound interest and amount due if a person takes loan for 5. [1] (b) Write the code for SUBMIT button to take the values from different options and store 3 points to a variable pt if selected sex is Female and branch is Humanities. 150000 2% of taxable income Nil Rs 250001 and above Rs. They should be enabled only when calculate command button is clicked. [4] (2) Read the following case study and answer the questions that follow: ABC company has developed the following interface to enter the display data related to Income tax of employees. 100001 to 150000 10% of amount exceeding Rs. 250000 2% of taxable income 1% of taxable income (3) Here is a Student‟s Entry Form. Now answer the jCheckBox ChkBskt following ChkFoot questions ChkSwim using the ChkHoky control jRadioButton RadioBoy names: RadioGirl (a) Write the code jComboBox CmbBranch for the EXIT jButton ButtonSubmit button to ButtonExit stop running the application. 150001 to 250000 Rs. surcharge and total tax amount should be disabled. game and branch and submit the Controls Name selected jTextField TextName data. 100000 Nil Nil Nil Rs. [2] When the user clicks the clear command button textboxes empcode and empname should be set of blank and textboxes be set to zero. 25000 + 20% of amount exceeding Rs. surcharge and total tax (sum of income tax. 100000 2% of taxable income Nil Rs. [2] When calculate command button is clicked income tax. [4] Taxable income Income tax Education tax Surcharge Upto Rs. [4] (4) Write the Java program as instructed below: A Financer often needs to calculate the interest and amount of his clients. The programmer opts for Net Beans IDE with Java to develop the following form as the layout given: . surcharge) is displayed in their respective text fields based on the following criterion :. Here a student shall enter his/her name and select sex. Education tax .

b) When Clear button is clicked all the text boxes should be clear. else if( (sal>=12000) && (sal <=15000)) else if (x==2) System. System.out. else } System. int n . (a) Write the code to disable the textInterest in the Form Load event of Object Property Radio Opt5years frmInterestCalc.out.If the Member check box is checked then the customer gets an additional discount of 5% on net payable amount.print (“Three”). j--) int sal . } else else { System.out. System. Credit Cards.print(“New year bonus is 2000”). The discount given as per mode of payment is as follows.println(“color code blue”).parseInt(TextNo.out. n= Integer. System. s=s+1.getText()).out. int i=99. do { System. Write code to do the following- Mode of payment Discount Cash 12% Debit Card Nil Credit Card 8% a) When Calculate button is clicked the discount and net payable amount is calculated as per the given criteria and displayed in discount and net payable text boxes. [1] Button Opt10Years (b) Write the code for cmdClear Command Button to clear all the text boxes. while(s<=13) while(stripes<=13) { { if (s%2==2) if(stripes%2==2) { System. Rewrite following while loop into a for loop int s=0. while (i<=33).out.print(“New year bonus is 5000”). else if (sal=>20000) else if (x==3) System.out. System. } e. c) Close the application when Exit button is pressed. Rewrite following while loop into a for loop f.out. int I . } { System. I. c.println(“colour code blue”). stripes =stripes +1. rate and time. The shop accepts payments in three modes.out. } { System. Rewrite the following code segment using for loop int total . Command cmdCalculate (d) Write the code for the click event of the command button to calculate the Button cmdClear compound interest and amount depending on the principal.out. Also put the cursor Text Field TxtPrincipal to the txtPrincipal. Rewrite the following code segment using switch case b.Cash. int stripes =0. { total =total + I.println(“colour code red”).print(“New year bonus is 7000”).println(“New color code ”). } i=i+1.out.println(“new stripe”). j>=1. II. To calculate net payable amount she has developed the following GUI in NetBeans. Convert the following into a FOR loop: [3] d. Convert the following without using a for loop: [3] instead of if else: [3] for( int j = 3. cmdExit [Compound Interest=> P * (1+r/100)^T Amount=> Principal + Compound Interest] (5) Ms. while( i< = n) i=i-3.println(“”+ i+10) .out. Debit Card.print (“Two”).print (“One”).print(“Bonus not applicable”). } } .out. Opt15Years And set default choice in the Option Button as 5 Years. { if (sal <=10000) if (x==1) System.out. } System. [2] TxtRate TxtInterest (c) Write the code for the text boxes for the Principal and Rate entry to ensure TxtAmount that the user enters only numeric values in them. Sheela works in a shopping mall.println(“color code red”). (6) RE-WRITE THE PROGRAMS WITH CONVERSIONS: a. Write the code to make the textfields for Discount( txtDiscount ) and Net Payable (txtNetPayable) un-editable.

out. System.out. do char ch. int y) for(x=1. if(Character. } else sum+=i/2. Rewrite following for loop into a while loop h. for(i=3.} System. } (7) Write the OUTPUT of the following code segments: [2 marks of the each qs. if any… (f) double i.toLowerCase(ch)).out. m+n <19. } while (Number > 0). k. Number = Number / 10.i=2.print(First – Second ).isDigit(ch)) (d) int i. String st="Comp9UtEr Scie7 nce". break.y) . for(i=1.println(“ “).out.print(" ").println(i++).count=10. k<=I .out.out.printl(“ “. ---------------------------------------------------------------------.print(Character.x<=4. System.out.println(“Hello \n”). i<=4. y<=4.++i) while(++i<20) { { if( i==8) sum=sum+c. } (c) (d) int m=100. { while (++i <5) if (m<10) f *=i. j. } } (c) double Number = 7583241. k++ . System. System.println(“m is “+m). { int i. } System.out. Int compute(int x.out.i). R = Number % 10.print("#").charAt(i).isUpperCase(ch)) Second += R. } . { one ob = new one(). System. m=m+10.y++) { x=x-y.out.toUpperCase(ch)). else if(Character. ++n). (e) Find the errors.i<st. j=I .length().out. Rewrite the following code using for loop.out. while(m>0) int f =1.pow(sum.i<8. int i=0.print(Character. Class two{ case 2 : Public static void main (String args[]) n3 =30 . } } (8) Find the ERRORS.] (a) (b) int x. ch=st. for(i=0.x++) { //Assuming x>=0 and y>=0 { If(x>=y) for(y=1. for(int i =1.+j). (e) int Firsr = 0. m=m-10. } System.g.i++) if ( R % 2 == 0 ) { First += R. Second = 0. ob. R. System. { if(i%4= =0) for( .println(f). } n2 =20 . else System. else } { return x.isWhitespace(ch)) System. n1 =10 .} n1 =40 . { return compute(x.y. break. } System.out. else if(Character.i<=5.print(" "+x). ++i) else { for(k=1.println(). sum=2 . int m=1. sum=Math. Re-Write and Give the expected Output of the following questions: (a) (b) switch(x) Class one{ { case 1 : Private int count. break. { break. int sum=0.++i) int n=0. j+=2) System.

h) Write a method pere()in a class which will take 2 parameters Length & Breadth as reference through object and find area. consumer name and address void display() : Display consumers details Class name : Bill Data me mbers/Instance variable : n : integer variable to store number of the units consumed Member functions : Billl(. j) Write a program to store natural numbers into a double dimension Array and print the sum of the numbers row wise.200 Rs 1. term] e) Write a method in a sub-class (yourclass) of the super class myclass that takes an integer value of N from the user and calculates the sum of the odd numbers up to Nth term. [S=A +A +…+ A th.print(x + 1). j>i . The function takes two integer value and returns the result correctly. i) Write a program to store your name into an Array and display character wise reading from the Array. } } X=i+j. (h) int i=0. which are of integer type..print(“The x is “ + x) } } (9) WRITE PROGRAM IN Java using Net Beans IDE: [Marks 3 / 4 each] a) Write a method that calculates the sum of all even numbers less that N b) Write a method that takes an integer argument N and calculates the sum of all even numbers less that N c) Write a method that takes 2 integer arguments N & A and returns the sum of powers of A up to Nth term. i++) while ( i < 10 ) { for(int j=5.x=0.) : Parameterised constructor to assign values to data members void calculate() :Calculate the monthly bill of consumer according to following slabs and it should also display the consumers details and total amount to be paid.100 Rs 500/-rental charges only 101 .(g) int x=0. [3] (m) A class Electbill contains consumer details and another class Bill calculates the monthly electricity bill of a consumer.50 per call + rental charges (n) Specify the class Electbill giving details of constructor and member function void display()....print(“The j is “ + j) { x == x + i .. k) Write a method will take New value and position as parameter.) : Parameterised constructor to assign values to consumer number. i<10.put. insert the new value in the specified position in an array..out. for(i=1. i ++.out. Use default value of 2 for n (to calculate squares) if argument is omitted.20 per call + rental charges Above 300 Rs 1. Number of units consumed Rate 1 . [S=A1+A2+…+ ANth term] d) Write a method in a class (myclass) that takes integer values of N and A and return the sum of the powers of A up to Nth 1 2 N term.out. j--) { { if (i % 2 = 0) System. System.300 Rs 1. System. and return the sum of the odd numbers up to Nth term and display it after the caller method called.00 per call + rental charges 201 . and return the sum of the odd numbers up to N and display the result. g) Write a method (sum()) in a class myclass and pass object (myobj) of the class as argument/parameter from the caller method . System. Details of the two classes are given below: Class name : Electbill Data members/Instance variable : cno : consumer number name : consumer name add : consumer address Member functions : Electbill(. f) Write a method in a child-class (yourclass) of parent class myclass that takes integer arguments/parameter of N from the caller method sum() through the object myobj . (l) Write a function Power to raise a number m to power n.display(“The i is “ + i).Using the concept of Inheritance specify the class Bill giving details of constructor and member function void calculate() (o) Write the programs of the following outputs: (i) # (ii) * * * (iii) @ (iv) 1 # # @ @ @ 2 2 2 * * @ @ @ @ @ 3 3 3 3 3 # # # * 2 2 2 1 .

] Table: STUDENT STDCODE NAME CLASS SECTION AVGMARK DOB S009 AJAY MALHOTRA 11 A 86. . b) Display all the Sections and Date of Birth from above two tables. h) Display the Different Sections and their corresponding numbers present in the table. (10. Address and Date of Admission from tables STUDENT and CLASS have similar student code. 15-8-1991. n) Delete the same column. th f) Display the Name. or year of birth before 1993. Admission number and Date of Birth of those where 7 latter of the address is A. k) Display number of records present in the table.50 12-SEPT-1993 S052 BIJAY MAJUMDAR 12 B 88 5-NOV-1989 Table : CLASS STDCODE SECTION ADDRESS DOA S009 A RANCHI 12-MAR-2001 S010 C PATNA 20-MAR-1999 S012 C TATA 13-FEB-2000 S013 D DHANBAD 15-JULY-1999 S022 L KOLKATA 10-MAR-2002 S033 K SILLIGURI 5-MAY-2004 S052 B BHUBANESWER 15-DEC-2003 (10. bb) Convert the date value into character value and number value of year of birth after 1990. Admission number and Date of Birth of those whose first character of name is K.AdmNo. 11. (ii) Now display Name.Name. e) Display the Name. i) Replace the Name Ajay Malhotra by “Ajit Mahapatra”. u) Show the Name and number of characters of each name. t) Display the values of Name and Date of Birth close together (concatinate). CHEQUE. w) Show the each of the names in capitals and small as well separately. b) Enter a new record: S009. ff) Display Student‟s Code .5 from STUDENT where Name like „S%‟. q) Display the Maximum Average Marks from each section. UNIQUE.5 mark of each qs.3) Write the OUTPUT of the following commands from the above table Student. Date of Admission . 80. Class. c) Re-arrange the records in descending and ascending order on Date of Birth. x) Locate position of the character „A‟ in each of the name. Date of Birth from the tables Student and Class using Allies of the Tables. DISTINCT(Section) from CLASS. STUDENT Y where X. l) Display Numbers of each section in the table of those who got Average Marks more than 75.45 5-OCT-1993 S020 SANJAY SRIVASTAVA 11 K 85. PRIMARY KEY. FOREIGN KEY. aa) Display first 5 characters of each of the name. E.0. Y. z) Remove all of the blank spaces from name field. o) Make the column Admission number as a Primary Key. s) Display the Total Average Marks of the table. d) SELECT Count(*).Roll. y) Display rest of the blank characters of a described field by „ * ‟.2) a) Display Name. DOB.1) a) Create the table Student. Swapan Pal. e) SELECT Count(*). using constraints NOT NULL. c) SELECT Addres from CLASS where Section IN (SELECT Section from STUDENT where Class>=11). Address . (iii) Again ADD the column Dropped before. Name . X.AdmNo=Y. r) Display the Minimum Average Marks from each section. p) Remove the existing record(s) of all who are not from classes 11 or 12.55 12-DEC-1995 S010 KUSUM VIMANI 12 C 79. v) Show the first character of each name as Capital.5. d) Display the Name Class Age and Date Of Birth of the students who have either less then 80 Average Marks.45 10-MAY-1990 S033 KAVITA SAXSENA 9 K 66. DEFAULT value “RANCHI” for Address in appropriate attributes/fields/columns. Average Marks and Address from the both of the tables Teacher & Student. hh) Write commands to: (i) DROP the common field STDCODE of Class table. b) SELECT X. ee) Make StdCode of the Student table as FOREIGN KEY in reference to the Parent table Teacher. (10. Date of Admission of the tables Teacher and Student.85 22-MAR-1994 S012 SARITA VERMA 12 C 98 23-JAN-1992 S015 KAILASH SINGH 10 D 78. j) Increase each of the Average Mark by 2.Address From STUDENT X. dd) Display the Power 3 of the Average Marks of the sections A. [Question# 5 & 6] RDBMS with MySQL [20] (1) Write the SQL commands of the following Table(s) [0. Date of Admission. m) Include a new column Address in the table. and AvgMark from Student. cc) Find the Square root and Reminder of division by 3 of Average marks. a) SELECT Name from STUDENT where AvgMark > (SELECT AvgMark from STUDENT where Class=11). f) SELECT (AvgMark * 0. g) Display the Different Sections present in the table. Section from STUDENT Group By Section Having Class>=10. c) Create a view MyClass using the columns Name. Average Marks . gg) Display Name .

Address DATE. MONTH(Sysdate()). Combo Box. 11. 3 Select Connection Type 4 Display the list of Items to be selected 5 Display total Amount of Bill 6 Display Name of all Customers with corres ponding Items month wise 7 Insertion of a frame for group selection. k) Write the SQL command to add Constraints NOT NULL & UNIQUE to Patient No. Command Button. i) SELECT StdCode. POWER(5. “A”). 3) SELECT DAYOFWEEK(CurDate()). Text Area and write in the third column. 6) SELECT INSTR ( TRIM(“ Indoaryan ” . 12) . NB: You must also go through the ‘Solved Exercises’ of the chapter ‘Review of SQL’. Section from Student UNION SELECT StdCode. 9) SELECT ROUND(544. Choos e appropriate cont rols from Text Field. POW(5. g) Write the SQL command to display the Name of the Patients.6).00 for the patients whose year of birth is before 1950. p) Write the SQL command to enter data to the attributes Department. Answer the questions based on the table HOSPITAL given below: [16X1=16] Table: HOSPITAL Column Name Data type Size Constraint Ptnt_No Number 4 Primary Key Ptnt_Name Varchar2 15 Not Null Dept Varchar2 15 ----- Doc_Name Varchar2 15 Not Null Dt_Birth Date --.1). who are from the department SURGERY. 2) SELECT DAYOFMONTH(„2010-10-17‟) . -2). ROLLBACK. Doctor‟s and Patient‟s Name q) Write the SQL command to Discard / Undo the latest changes made in the table. ----- Fees Number 6. f) Write the SQL command to change the length of the field Dept by 12. 5) SELECT CONCAT(LOWER(„Class‟). Check Box. Section from Class. 8) . 8) SELECT RIGHT(“To the power of” . n) Write the SQL command to display the oldest patient‟s date of birth.4583 . Anand is working as a Planning Manager in Zoom Tech. 15 + 5 . l) Write the SQL command to display the first 5 characters of the patient‟s name. h) Write the SQL command to remove a record of the Patient No 104. a) Categorize the DDL and DML commands : CREATE. 4) SELECT SUBSTR(„Common Wealth Games 2010‟.3). d) Write the SQL command to display the number of patients in each department for the names starts by character “S”. Label. Now read the questions carefully and write the SQL Commands of the followings. m) Write the SQL command to display the total amount of fees collected.1) SELECT MAX (AvgMark) from STUDENT. j) Write the SQL command to Include a new attribute Srlno [Number(3)] to the table. st b) Write the SQL command to display the details of all the patients whose date of birth is after 1 January 2000. e) Write the SQL command to increase the consultation fees by Rs 50. SNo Control Used to Control 1 Enter Name of Customer 2 Enter Mobile No. corresponding Departments and Date of Birth. Deptname VARCHAR2(15). DELETE. COMMIT . 15 * 2 .8.3). j) UPDATE Class Set Address=‟Ranchi‟ Where StdCode =(Select StdCode From Student Where DOB=”1993-10-15”). . o) Write the SQL command to enter new record as per your choice to the corresponding attributes. 7) SELECT LEFT(“To the power of” . List Box.UPPER(„xii‟)). [Question# 7] IT Application [05] 14. c) Write the SQL command to display the type of Departments. 10) SELECT 15 / 4 . SELECT . Name and Address from the above tables (Hospital and Department). ALTER b) Write the output of the following SQL queries using library functions : 1) SELECT TRUNCATE(22. Radio Button.78. GRANT. h) SELECT SUM (AvgMark) from STUDENT where DOB > “1990-12-13” AND DOB < “1995-1-1”.g) SELECT MIN (AvgMark) from STUDENT.00 Ptnt_Phno Number 12 Check <=12 a) Write the SQL command to create the table Hospital including its constraints. He wants to create the forms with the following functions. in alphabetical order of the names of the patients. (g. Panel.2 Default 00. (b) Display the records from both of the tables even those have no common records. [2X2=4] (a) Display the Department. 12. a) What benefit does an e-Business offers to the customers? b) How e-Learning is being benefited to the student class? c) How has society benefited from e-Governance? d) What are good interface? e) How do the connection between Front End and Back End work together in the application of IT? f) Explain the application of the following in real life project on : (i) e-Governance (ii) e-Learning (iii) e-Business g) Mr. i) Write the SQL command to remove the table. TRUNCATE. Consider another new table DEPARTMENT along with the table TEACHER having the fields: Srlno NUMBER(3). Ptnt_No NUMBER(4).

e. Self elevation and Eugenics i. let‟s uphold it…” Hope we will be in touch for longer time. “The laws of total development of individual and society are – Concentricity. from any corner of the globe. Srikumar Mukherjee..com Ph # +91-9470932544 / 909753620 (Mob) To upgrade the quality of thought do visit: www. Ideal centric go-of-life.org .M. Ranchi Email: srikumar2005_ranchi@yahoo.COLLECT the Question and Answer papers of Sem-II and Pre-Board Exams and critically read and understand it .. Accordingly self-manipulation and Bio-psychic compatible marriage. of Computers. which were already distributed to you. I do wish .co. Yours own forever – S. Dept.be a person with your evolving qualities and efficiencies for your greater surroundings. Delhi Public School. Developed and Designed by: Dr.in / seeence@gmail. For further you are free to contact.indoaryan.