Earn by twitter on twivert

Sign up for PayPal and start accepting credit card payments instantly.

Sunday, May 2, 2010

To display student record’s thrg inheri


/*To display student record’s thrg inheri*/
/*Save as: inherited*/

import java.lang.*;
class Student_information
{
   int id;
   String name,addr;
   Student_information(int id,String name,String addr)
     {
     this.id=id;
     this.name=name;
     this.addr=addr;
     }
   void display()
     {
     System.out.println("information of student");
     System.out.println("id"+id);
     System.out.println("name"+name);
     System.out.println("address"+addr);
     }
}
class Student_record extends Student_information
{
   String branch,sem;
   Student_record(int id,String name,String addr,String branch,String sem)
   Super(id,name,addr);
   {
   this.branch=branch;
   this.sem=sem;
   }
   void display()
   {
   display();
   System.out.println("student record");
   System.out.println("branch"+branch);
   System.out.println("sem"+sem);
   }
}
class inherited
{
    public static void main(String args[])
      {
      Student_record s1=new Student_record(47,"student A","har","bca","second");
      Student_record s2=new Student_record(49,"student B","mah","bca","second");
      Student_record s3=new Student_record(11,"student C","delhi","cs","third");
      
      s1.display();
      s2.display();
      s3.display();
      
      }
}

WAP to display day name according to enter number


/*WAP to display day name according to enter number*/

#include<stdio.h>
#include<conio.h>
void main()
{
int day;
clrscr();
printf("enter no.");
scanf("\n%d",&day);
switch(day)
{
case 1:printf("monday");
break;
case 2:printf("tuesday");
break;
case 3:printf("wednesday");
break;
case 4:printf("thusday");
break;
case 5:printf("friday");
break;
case 6:printf("satarday");
break;
case 7:printf("sunday");
break;
default:printf("No Day");
}
getch();
}

ADS

How to earn online

How to earn online:
Step - 1 :
signup for PayPal, to recieve your online earning
click here:
https://www.paypal.com/in/mrb/pal=CZ7224TZBMCBL
step - 2 : Singup these 4 sites & earn & enjoy! Read site to know how to earn.
1. trekpay
Earn up to $0.02 (2 cents) per click.
http://www.trekpay.com/?ref=34690
2. neobux
Earn up to $0.02 (2 cents) per click.
Click here:
http://www.neobux.com/?r=Moneyearner786

AddMe

Bookmark and Share