-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPart1Chapter1.java
More file actions
54 lines (44 loc) · 1.95 KB
/
Part1Chapter1.java
File metadata and controls
54 lines (44 loc) · 1.95 KB
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
53
54
import javax.swing.JOptionPane;
import java.util.Scanner;
public class Part1Chapter1{
public void Part1Chapter1Display(){
Scanner src= new Scanner(System.in);
int input;
do {
System.out.println("___________________________________________________________________");
System.out.println("_________>>>>>>> Part 1 :: Chapter 1 (ProgramList) <<<<<<<_________");
System.out.println("===================================================================\n");
//part 1 :: Chapter 1
System.out.println("Program 1 :: LISTING 1.1 Welcome.java\n");
System.out.println("Program 2 :: LISTING 1.2 Welcome1.java \n");
System.out.println("Program 3 :: LISTING 1.3 ComputeExpression.java \n");
System.out.println("Program 4 :: LISTING 1.4 WelcomeInMessageDialogBox.java\n");
System.out.println("Program 5 :: ProEx (Displaying a pattern) \n");
System.out.println("_____________________________________________________________________\n");
System.out.println("Enter number for Listing :: 0 for Part 1_Chapter List");
input = src.nextInt();
switch (input){
case 1:
System.out.println("Welcome to java !!!" );
break;
case 2:
System.out.println("Programming is fun !!!" );
System.out.println("Fundamentals First !!!" );
System.out.println("Problem Driven !!!" );
break;
case 3:
System.out.println("ComputeExpression = "+(10.5+ 2 *3)/(45-3.4));
break;
case 4:
JOptionPane.showMessageDialog(null,"Welcome to Java!!!");
break;
case 5:
System.out.println(" J A V V A ");
System.out.println(" J A A V V A A ");
System.out.println(" J J AAAAA V V AAAAA ");
System.out.println(" J J A A V A A ");
break;
}
}while (input!=0);
}
}