Code:
Sunday, March 31, 2019
SUM AND AVERAGE OF N ELEMENTS IN DYNAMIC ARRAY IN CORE JAVA
Code:
CONSTRUCTOR OVERLOADING
FUNCTION OVERLOADING
CONSTRUCTOR OVERLOADING IN JAVA
Input three numbers using constructor and print the largest
Area of Rectangle (CORE JAVA)
Friday, March 22, 2019
package ( core java )
path ="D:\javaprogram"
code under directory "D:\javaprogram" :
package javaprogram;
public class p1
{
public void print()
{
System.out.println("asdfg");
}
}
step 2: compile:
C:\Users\user>d:
D:\>cd javaprogram
D:\javaprogram>javac p1.java
D:\javaprogram>
step3: go to parent directory
D:\javaprogram>cd ..
D:\>
step4 : create p2.java under directory "d:"
step5 (optional) : for checking , if package is created or not ( if main() is present in p1 class)
D:\>java javaprogram.p1 ( if main() is not present , it will get an error)
step 6: code of p2.java
import javaprogram.p1;
public class p2 extends p1
{
public static void main(String args[])
{
p2 ob =new p2();
ob.print();// print function from p1 (package javaprogram)
}
}
Thursday, March 21, 2019
Wednesday, March 20, 2019
visual basic program list
3. get input using inputbox and then sum of digit
8. basic calculator using visual basic 6 example
9. INPUT A NUMEBR FROM TEXT BOX AND CHECK THE NUMBER IS EVEN OR ODD EXAMPLE PROGRAM CODE IN VISUAL BASIC 6
10. CHANGE THE BACKGROUND COLOR OF VB FROM USING RADIO BUTTON PROGRAM CODE IN VISUAL BASIC
11. SUM OF SERIES PROGRAM CODE IN VISUAL BASIC 6, GET RANGE FROM TEXT BOX
12. INPUT 3 NUMBERS FROM TEXT BOX AND PRINT THE LARGEST NUMBER IN VISUAL BASIC 6 EXAMPLE CODE
13. INPUT 3 NUMBERS FROM TEXT BOX AND PRINT THE SMALLEST NUMBER IN VISUAL BASIC 6 EXAMPLE CODE
14. INPUT A STRING FROM TEXT BOX AND CHECK THE STRING IS PALLINDROME OR NOT USING VISUAL BASIC 6 EXAMPLE
15. INPUT A NUMBER FROM TEXT BOX AND PRINT THE FACTORIAL OF THE NUMBER IN VISUAL BASIC 6 EXAMPLE CODE
16. INPUT A NUMBER FROM TEXT BOX AND CHECK IT IS A PRIME NUMBER OR NOT IN VISUAL BASIC EXAMPLE
17. INPUT A YEAR FROM TEXTBOX AND CHECK IT IS LEAP YEAR OR NOT.
18. PATTERN PRINT USING '*' IN VISUAL BASIC 6
*****
*****
*****
*****
19. TRIANGLE PATTERN PRINT USING '*' IN VISUAL BASIC 6
*
**
***
****
*****
20. PATTERN PRINT IN VISUAL BASIC 6
11111
22222
33333
44444
55555
21. PATTERN PRINT IN VISUAL BASIC 6
12345
12345
12345
12345
12345
22. PATTERN PRINT IN VISUAL BASIC 6
1
12
123
1234
12345
23. PATTERN PRINT IN VISUAL BASIC 6
1
22
333
4444
55555
24. PATTERN PRINT IN VISUAL BASIC 6
55555
44444
33333
22222
11111
25. PATTERN PRINT IN VISUAL BASIC 6
55555
4444
333
22
1
26. PATTERN PRINT IN VISUAL BASIC 6
AAAAA
BBBBB
CCCCC
DDDDD
EEEEE
27. PATTERN PRINT IN VISUAL BASIC 6
ABCDE
ABCDE
ABCDE
ABCDE
ABCDE
28. TRIANGLE PATTERN IN VISUAL BASIC 6
A
AB
ABC
ABCD
ABCDE
ABCDEF
29. TRIANGLE PATTERN PRINT IN VISUAL BASIC 6
A
BB
CCC
DDDD
EEEEEE
FFFFFFFF
c language pragram (graph theory)
2. BFS
3. FLOYD
4. WARSHALL
5. PRIMS
6. KRUSKAL
7. DIJKSTRA
c language set1
Why is C called a mid-level
programming language?
What is the newline escape sequence?
What is typecasting?
difference between the local variable
and global variable in C
What is the difference between Entry
Controlled and Exit Controlled loop in C?
differences between a call by value
and call by reference
use of a static variable in C
Difference between formal argument and
actual argument ?
recursion in C
pointer to pointer in C
NULL pointer in C
problem of a dangling pointer
Write in detail about pointers to
functions?
array using a pointer in C language
What is the difference between getch()
and getche()?
What is command line argument?
Can we compile a program without
main() function?
static memory allocation
dynamic memory allocation in C
language
What is the difference between
malloc() and calloc()?
Explain about free( ) and realloc( )
allocation functions
What is the difference between structure
and union?
How can typedef be to define a type of
structure?
What are the differences between
structures and arrays?
What are macros? What are its
advantages and disadvantages?
What are enumerations?
Describe about storage allocation and
scope
What is storage class.What are the
different storage classes in C?
why is the void pointer useful? When
would you use it?
What is a preprocessor, What are the
advantages of preprocessor ?
What are the two forms of #include
directive ?
What's the difference between #include
<> and #include "" ?
Are the expressions *ptr ++ and ++
*ptr same ?
What is a header file in C? List any
two header files
What is an lvalue?
What do you understand by R-value and
L-value? Give suitable examples.
Friday, March 15, 2019
Draw rectangle using drawline method using applet(java code).
import java.applet.Applet;
import java.awt.Graphics;
import java.applet.*;
import java.awt.*;
public class rectangle extends Applet
{
public void paint(Graphics g)
{
g.drawLine(10,10,10,20);
g.drawLine(20,20,20,10);
g.drawLine(10,20,20,20);
g.drawLine(20,10,10,10);
}
}
Input a string from user and print using applet(java code).
//applet.java
import java.applet.Applet;
import java.awt.Graphics;
import java.util.Scanner;
public class applet extends Applet
{
public void paint(Graphics g)
{
String name,city,ph,m;
System.out.println("Type your name");
Scanner o=new Scanner(System.in);
name=o.nextLine();
System.out.println("enter the city");
city=o.nextLine();
System.out.println("enter the phone number");
ph=o.nextLine();
System.out.println("enter the phone marks");
m=o.nextLine();
g.drawString(name,30,30);
g.drawString(city,30,40);
g.drawString(ph,30,50);
g.drawString(m,30,60);
}
}
applet code in java .
download code
2. Input a string from user and print using applet(java code). link
3. Draw rectangle using drawline method using applet(java code). link
Friday, March 8, 2019
draw string using applet program in java
import java.applet.Applet;
import java.awt.Graphics;
public class applet1 extends Applet
{
public void paint(Graphics g)
{
g.drawString("Hello World", 20, 20);
}
}
//step2: applet1.html
<applet code="applet1" width=200 height=60>
</applet>
//step3: execution
D:\java program\java>javac applet1.java
D:\java program\java>appletviewer applet1.html
output:::
download code ::
click for download