Nov

03

Click to download File Handling in C++ Sample code dated 03.11.2018
For BCA Students

Do corrections in header files as per C++ Dev Turbo C++ editor

Sep

20

Jun

11

Check you email ID. I had shared a google drive link.
you can download codes from there.
Thanks

Filled Under: General

Mar

28

I have attached PPTs related to Cyber Security topics. All these PPTs are searched from Google and downloaded from different websites, which are places here according to Cyber Security topics. It may help you understand better the Cyber Security related content.

Feb

12

CUI Menu Based Java Program Sample

//—————–T45.java———————-

import java.io.*;
class T45{
public static void main(String args[]){
Console c=System.console();
int mn;
String ch;
do{
System.out.println(“\t\t :: Main Menu ::”);
System.out.println(“1- Get the Area of Square”);
System.out.println(“2- Get the Area of Rectangle”);
mn=Integer.parseInt(c.readLine(“Enter Your choice: “));
switch(mn){
case 1: {
//System.out.println(“case 1 executed”);
Square obj=new Square();
obj.area();
break;
}
case 2:{
//System.out.println(“case 2 executed”);
Rect obj=new Rect();
obj.area();
break;
}
default: System.out.println(“Invalid Choice”);
}
ch=c.readLine(“Do you want to continue(y/n): “);
}while(ch.equalsIgnoreCase(“y”));
}
}

//—————–Square.java———————-

import java.io.*;
class Square{
int a, area;
Console c=System.console();
void area(){
a=Integer.parseInt(c.readLine(“Enter length of square: “));
area=a*a;
System.out.println(“SQ Area is: “+area);
}
}

//—————–Rect.java———————-

import java.io.*;
class Rect{
int n1,n2, area;
Console c=System.console();
void area(){
n1=Integer.parseInt(c.readLine(“Enter width of rect: “));
n2=Integer.parseInt(c.readLine(“Enter height of rect: “));
area=n1*n2;
System.out.println(“Rect Area is: “+area);
}
}

Dec

04

NOTES OF BCA-V Subject: Java Programming and Dynamic Webpage Design (BCA-S302T)

Dec

03

SERVLET SAMPLE Codes for BCA-V (2017), MGKVP Uinversity

Dec

03

JSP SAMPLE Codes for BCA-V (2017), MGKVP Uinversity

Dec

03

CLICK TO DOWNLOAD All HTML Code for BCA-V (2017), MGKVP Uinversity

Nov

17

import java.sql.*;
import java.io.*;
class TestDb9{
public static void main(String ard[]){
try{
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);
Connection con=DriverManager.getConnection(“jdbc:odbc:BCADSN”,”system”,”ram”);

Statement stmt=con.createStatement();

//——————— TO DELETE RECORED——–
Console c=System.console();
String empno=c.readLine(“Enter Emp No want to update: “);
String mob=c.readLine(“Enter Mobile Number:”);
String qu=”update emp set mobile='”+mob+”‘ where empno=”+empno;
System.out.println(qu);
int num=stmt.executeUpdate(qu);
if(num==0){
System.out.println(“No such record found”);
}
// ———————— END —————————-
qu=”select * from emp order by empno”;
ResultSet rs=stmt.executeQuery(qu);
while(rs.next()){
System.out.println(rs.getString(“empno”)+”\t”+rs.getString(“ename”).toUpperCase()+”\t”+rs.getString(“mobile”));
}
rs.close();
stmt.close();
con.close();
}catch(Exception e){
System.out.println(e);
}
}
}

Nov

17

import java.sql.*;
import java.io.*;
class TestDb8{
public static void main(String ard[]){
try{
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);
Connection con=DriverManager.getConnection(“jdbc:odbc:BCADSN”,”system”,”ram”);
System.out.println(“Con established”);
Statement stmt=con.createStatement();
System.out.println(“statement created”);
//——————— TO DELETE RECORED——–
Console c=System.console();
String empno=c.readLine(“Enter Emp No want to delete: “);
String qu=”delete from emp where empno=”+empno;
System.out.println(qu);
int num=stmt.executeUpdate(qu);
if(num==0){
System.out.println(“No such record found”);
}
// ———————— END —————————-
qu=”select * from emp order by empno”;
ResultSet rs=stmt.executeQuery(qu);
while(rs.next()){
System.out.println(rs.getString(“empno”)+”\t”+rs.getString(“ename”).toUpperCase()+”\t”+rs.getString(“mobile”));
}
rs.close();
stmt.close();
con.close();
}catch(Exception e){
System.out.println(e);
}
}
}

Nov

17

import java.sql.*;
import java.io.*;
class TestDb6{
public static void main(String ard[]){
try{
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);
Connection con=DriverManager.getConnection(“jdbc:odbc:BCADSN”,”system”,”ram”);
System.out.println(“Con established”);
Statement stmt=con.createStatement();
System.out.println(“statement created”);
//——————— TO INSERT RECORED——–
Console c=System.console();
String empno=c.readLine(“Enter Emp No: “);
String empName=c.readLine(“Enter Emp Name: “);
String empMob=c.readLine(“Enter Emp Mobile: “);
String qu=”insert into emp values(“+empno+”,'”+empName+”‘,'”+empMob+”‘)”;
System.out.println(qu);
stmt.execute(qu);
System.out.println(“row inserted”);

// ———————— END —————————-
qu=”select * from emp order by empno”;
ResultSet rs=stmt.executeQuery(qu);
while(rs.next()){
System.out.println(rs.getString(“empno”)+”\t”+rs.getString(“ename”).toUpperCase()+”\t”+rs.getString(“mobile”));
}
rs.close();
stmt.close();
con.close();
}catch(Exception e){
System.out.println(e);
}
}
}

Nov

17

import java.sql.*;
import java.io.*;
class TestDb5{
public static void main(String ard[]){
try{
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);
Connection con=DriverManager.getConnection(“jdbc:odbc:BCADSN”,”system”,”ram”);
System.out.println(“Con established”);
Statement stmt=con.createStatement();
System.out.println(“statement created”);
String qu=”select * from emp”;
ResultSet rs=stmt.executeQuery(qu);
while(rs.next()){
System.out.println(rs.getString(“empno”)+”\t”+rs.getString(“ename”).toUpperCase()+”\t”+rs.getString(“mobile”));
}
}catch(Exception e){
System.out.println(e);
}
}
}