10 World-Changing Innovators for 2012

Posted by & filed under Science & Technology.

1) Master of Creative Disruption Leadership Award Innovator: Elon Musk, CEO of Space Exploration Technologies and Tesla Motors Elon Musk, the entrepreneur, is having a good year. His companies, Space Exploration Technologies (SpaceX) and Tesla Motors, both hit historic milestones. SpaceX became the first private company to build, launch, and operate a spacecraft that docked with… Read more »

Use Time Object in Java.

Posted by & filed under Language.

How to use time object in java. public class Time1Test { public static void main(String args[]) { Time1 time=new Time1(); System.out.print(“The initial universal time is : “); System.out.println(time.toUniversalString()); System.out.print(“The initial standard time is : “); System.out.println(time.toString()); System.out.println(); time.setTime(13,27,6); System.out.print(“Universal time after setTime is : “); System.out.println(time.toUniversalString()); System.out.print(“Standard time after setTime is : “); System.out.println(time.toString()); System.out.println();… Read more »

Find maximum among three number in JAVA

Posted by & filed under Language.

Write a program to find which number is maximum. import java.util.Scanner; public class MaximumFinder { public void determineMax() { Scanner input=new Scanner(System.in); double a,b,c,maximum; System.out.print(“Enter 3 numbers : “); a=input.nextDouble(); b=input.nextDouble(); c=input.nextDouble(); maximum=max(a,b,c); System.out.println(maximum); } public double max(double a,double b,double c) { double k=0; if (a>b && a>c) k=a; else if(b>c) k=b; else k=c; return… Read more »

GUI program to draw lines from corner to corner in JAVA

Posted by & filed under Language.

Write a program to draw line from corner to corner in JAVA. import javax.swing.JPanel; import java.awt.Graphics; public class MP4 extends JPanel { public void paintComponent(Graphics g) { super.paintComponent(g); int width=getWidth(); int height=getHeight(); for(int i=1;i<=15;i++) { g.drawLine(0,0,width,0); width=width+15; height=height+15; } } }  

GUI program to add two numbers in JAVA

Posted by & filed under Language.

Write a program to add two two number in JAVA import javax.swing.JOptionPane; public class MP3 { public static void main(String args[]) { String n1=JOptionPane.showInputDialog(“Enter the 1 st number.”); String n2=JOptionPane.showInputDialog(“Enter the 2 nd number.”); double a,b,c; a=Double.parseDouble(n1); b=Double.parseDouble(n2); c=a+b; String message=String.format(“the sum of the entered two numbers is %.2f”,c); JOptionPane.showMessageDialog(null,message); } }  

GUI program to show basic input using a dialog box in JAVA

Posted by & filed under Language.

GUI program to show basic input using a dialog box. import javax.swing.JOptionPane; public class MP2 { public static void main(String args[]) { String hobby=JOptionPane.showInputDialog(“What is your hobby?”); String message=String.format(“Hi i am Piyush and my hobby is %s”,hobby); JOptionPane.showMessageDialog(null,message); } }  

Write a program in C++ To Delete a Node From a Linked List Having User Given Data ‘X’ in it

Posted by & filed under Language, Software Development.

In computer science, a linked list is a data structure consisting of a group of nodes which together represent a sequence. Under the simplest form, each node is composed of a datum and a reference (in other words, a link) to the next node in the sequence; more complex variants add additional links. This structure allows for efficient insertion or removal of elements from any… Read more »

Write a program In C++ To Create A Circular List And Then Count The Number Of Nodes Into It.

Posted by & filed under Language, Software Development.

Circular Lists A circular list is one in which the last node is followed by the first node: Circular lists are usually preferable to non-circular ones, for two reasons: They provide easy access to both ends of a list: notice that we do not need the first pointer in the header, because we can easily reach the first node with L->last->next the… Read more »