Tag: BIM Notes
Web 2017 Old paper Solutions || BIM STUDY NOTES
Year 2017 checkout question in question paper section. //Q.no 11
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
<html> <head> <style> table { border:1px solid black; border-collapse:collapse; } </style> </head> <body> <table border="width:50%"> <tr> <th colspan="2">Subject</th> <th> John Doe</th> <th>Mirim Luther</th> </tr> <td rowspan="2"><b>Biology</b></td> <td><b>Practical</b></td> <td> A</td> <td>A</td> </tr> <tr> <td><b> Theory</b></td> <td>A+</td> <td> A</td> </tr> <tr> <td rowspan="2"><b>Chemistry</b></td> <td><b>Practical</b></td> <td>B</td> <td>C</td> </tr> <tr> <td><b>Theory</b></td> <td>A</td> <td>C+</td> </tr> <tr> <td rowspan="2"><b>Physics</b></td> <td><b>Practicals</b></td> <td>A </td> <td>A</td> </tr> <tr> <td><b> Theory</b></td> <td>A-</td> <td>A-</td> </tr> </table> </body> </html> |
Q.no 12
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
<html> <head> <title>Divs</title> <style type="text/css"> .main{border:2px solid black; height:500px;width:1000px;} .fr{height:100px;width:1000px;border-bottom:2px solid black;} .fr1{height:100px;width:800px;border-right:2px solid black;float:left;} .fr2{height:100px;width:200px;float:right;} .sr{height:300px;width:1000px;border-bottom:2px solid black;} .sr1{height:300px;width:200px;border-right:2px solid black;float:left;} .sr2{height:300px;width:800px;float:right;} .tr{height:100px;width:1000px;} </style> </head> <body> <div class="main"> <div class="fr"> <div class="fr1"></div> <div class="fr2"></div> </div> <div class="sr"> <div class="sr1"></div> <div class="sr2"></div> </div> <div class="tr"></div> </div> </body> </html> |
Q.no 13 Write a JavaScript function that takes two strings as arguments and checks them for equality. If both the strings are equal then display the first string in uppercase else return “the two strings do not match”.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<html> <head> <title>String 4</title> </head> <body> <script type="text/Javascript" str1=new String("BIM Study Notes"); var a1=str1.length; str2=new String("BIM Study Notes"); var a2=str2.length; var i; var count=0; for(i=0;i<=a1;i++) { if(str1.charAt(i)!=str2.charAt(i)) { count++; break; } } if(count==0) { document.write("<br>Uppercase is: "+str1.toUpperCase()); } else document.write("<br>They are not equal"); </script> </body> </html> |
Q.no […]
Continue ReadingWeb 2020 makeup solution || BIM NOTES
Q.no 11 & 16 :- checkout in web long answer question page . Q.no 12 Q. write a javaSrcipt to validate a form with inputs name (cann’t be empty ) & contact (cann’t be empty .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
//bim study notes <html> <head> <script> function validateForm() { var x = document.forms["myForm"]["fname"].value; var y = document.forms["myForm"]["Cname"].value; if (x == "") { alert("Name must be filled out"); return false; } else if (y.length!=10) { alert("Contact must be 10 digit"); return false; } } </script> </head> <body> //bim study notes <form name="myForm" action="/action_page.php" onsubmit="return validateForm()" method="post"> Name: <input type="text" name="fname"> Contact: <input type="text" name="Cname"> <input type="submit" value="Submit"> </form> </body> </html> |
Q.No 13 write a javascript to reverse the given input integer (e.g 426 (input ) to 624 (output). […]
Continue ReadingJava 2 old Papers Solution 2018 || BIM STUDY NOTES
year 2018 Create a HTML document that contains header information of a page and include this HTML as a header file in header.html
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> </head> <body> <center> <h1>Orchid International College</h1> <h3>Gaushala, Kathmandu</h3> </center> </body> </html> |
include.jsp <html> <body> <%@include file = “header.html” %> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p></body> </html> 3. Create […]
Continue ReadingJava 2 old Papers Solution 2017 || BIM STUDY NOTES
Year 2017 Group B 2.Write a program to display records from the table “employee” that contains (id, name, post and salary) inside the database “testdb”.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import java.sql.*; public class Ques2_2017 { public static void main(String[] args) { String url = "jdbc:mysql://localhost:3306/testdb"; String uname = "root"; String pwd = ""; try { Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection(url, uname, pwd); String sql = "select * from employee"; Statement st = con.createStatement(); ResultSet rs = st.executeQuery(sql); while(rs.next()) { System.out.println(rs.getString("id")); System.out.println(rs.getString("name")); System.out.println(rs.getString("post")); System.out.println(rs.getString("salary")); } }catch(Exception ex) { System.out.println(ex); } } } |
Q.no 3 Create jsp page to display all odd numbers from 10 to 50
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <title>Printing odd numbers from 10 to 50</title> </head> <body> <% out.print("<b> odd numbers from 10 to 50</><br>"); for( int i=10;i<=50;i++) { if(i%2!==0){ out.print("<br><b>"+i+"</b>"); } } %> </body> </html> |
Q.no 5 Write a servlet to find the reverse of a string.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
import java.applet.*; import java.awt.event.*; import java.awt.*; public class T2017_5 extends Applet implements ActionListener{ Panel p1,p2; Label l1,l2,l3; TextField t1,t2,t3; Button b1,b2; public void init(){ p1=new Panel(); p2=new Panel(); p1.setLayout(new GridLayout(3,2)); p2.setLayout(new FlowLayout()); l1=new Label("Number 1"); l2=new Label("Number 2"); l3=new Label("Result"); t1=new TextField(); t2=new TextField(); t3=new TextField(); t3.setEditable(false); p1.add(l1); p1.add(t1); p1.add(l2); p1.add(t2); p1.add(l3); p1.add(t3); add(p1); add(p2); b1=new Button("+"); b2=new Button("-"); p2.add(b1); p2.add(b2); } public void start(){ b1.addActionListener(this); b2.addActionListener(this); } public void actionPerformed(ActionEvent e){ int a=Integer.parseInt(t1.getText()); int b=Integer.parseInt(t2.getText()); if(e.getSource()==b1){ int c=a+b; t3.setText(" "+c); } else if(e.getSource()==b2){ int c=a-b; t3.setText(" "+c); } } } |
Group […]
Continue ReadingAIW 2016 & 2016 Model Question || BIM STUDY NOTES
2016 Model Question Q.no 4 2016 1.ii 1.v
Continue ReadingCO 2017 & 2018 Solution || BIM STUDY NOTES
Year 2017 2017 question 13 same as 2018 makeup 11 Year 2018
Continue ReadingJAVA 2019 Old Papers Solution
year 2019 Q.no 11
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
class BIM { public static void main(String args[]) { int a=0, b=1, c; System.out.println(a); System.out.println(b); for(int i=3;i<=10;i++) { c=a+b; a=b; b=c; System.out.println(c); } } } |
Q.no 12
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
String aar[]={"January","February","March","April","May","June","July","August","September","October","November","December"}; for(int i=0; i<aar.length; i++) { System.out.println("month"+aar[i]); try{ Thread.sleep(1000); } catch(Exception e) { System.out.println(e); } }}} class days implements Runnable { public void run() { String aa[]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"}; for(int i=0; i<aa.length; i++) { System.out.println("month"+aa[i]); try{ Thread.sleep(1500); } catch(Exception e) { System.out.println(e); } }}} class den { public static void main(String args[]) { month m=new month(); Thread t=new Thread(m); t.start(); days d=new days(); Thread t1=new Thread(d); t1.start(); } } |
Q.no 13
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
class Number { int x; int y; int z; Number(inta,intb,int c) { x=a; y=b; z=c; } intgetMax(){ if(x>y&&y>x) return(x); else if(y>z) return(y); else return(z); } } classNumberDemo { public static void main(String args[]) { Number n=new Number(3,7,5); System.out.println("largest number is"+n.getMax()); } } |
Q.no 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
class Box { int length; int breadth; int height; Box(inta,intb,int c) { length=a; breadth=b; height=c; } voidgetVolume(){ int v=length*breadth*height; System.out.println("Volume is"+v); }} classBoxWeight extends Box{ int weight; BoxWeight(inta,int b, int c) { super(a,b,c); } voidsetweight(int w) { weight=w; } voidgetWeight(){ System.out.println("weight"+weight); } void display(){ super.getVolume(); } } classBoxDemo { public static void main(String args[]) { BoxWeight n=new BoxWeight(0,0,0); n.setweight(200); n.getWeight(); BoxWeightob=new BoxWeight(2,3,4); ob.display(); } } |
Q.no 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
importjava.util.Scanner; import java.io.*; public class JavaProgram { public static void main(String[] input) { String fname; Scanner scan = new Scanner(System.in); /* enter filename with extension to open and read its content */ System.out.print("Enter File Name to Open (with extension like file.txt) : "); fname = scan.nextLine(); /* this will reference only one line at a time */ String line = null; try { /* FileReader reads text files in the default encoding */ FileReaderfileReader = new FileReader(fname); /* always wrap the FileReader in BufferedReader */ BufferedReaderbufferedReader = new BufferedReader(fileReader); while((line = bufferedReader.readLine()) != null) { System.out.println(line); } /* always close the file after use */ bufferedReader.close(); } catch(IOException ex) { System.out.println("Error reading file named '" + fname + "'"); } } } |