-
Notifications
You must be signed in to change notification settings - Fork 0
/
Essentials.java
3569 lines (2807 loc) · 199 KB
/
Essentials.java
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Essentials extends JFrame implements ActionListener{
private JButton Module1;
private SubMenuM1 subMenuM1;
private JButton Module2;
private SubMenuM2 subMenuM2;
private JButton Module4;
private SubMenuM4 subMenuM4;
private JButton Module7;
private SubMenuM7 subMenuM7;
private JButton Module9;
private SubMenuM9 subMenuM9;
private JButton Credits;
public Essentials() {
super("Main Menu");
Module1 = new JButton("Module 1");
Module1.addActionListener(this);
Module2 = new JButton("Module 2");
Module2.addActionListener(this);
Module4 = new JButton("Module 4");
Module4.addActionListener(this);
Module7 = new JButton("Module 7");
Module7.addActionListener(this);
Module9 = new JButton("Module 9");
Module9.addActionListener(this);
Credits = new JButton("Credits");
Credits.addActionListener(this);
JPanel buttonPanel = new JPanel(new GridLayout(3, 1, 10, 5));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 7, 5, 7));
buttonPanel.add(Module1);
buttonPanel.add(Module2);
buttonPanel.add(Module4);
buttonPanel.add(Module7);
buttonPanel.add(Module9);
buttonPanel.add(Credits);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(buttonPanel, BorderLayout.CENTER);
setSize(430, 180);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLocationRelativeTo(null);
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == Module1) {
subMenuM1 = new SubMenuM1();
subMenuM1.setVisible(true);
} else if (e.getSource() == Module9) {
subMenuM9 = new SubMenuM9();
subMenuM9.setVisible(true);
} else if (e.getSource() == Module2) {
subMenuM2 = new SubMenuM2();
subMenuM2.setVisible(true);
} else if (e.getSource() == Module4) {
subMenuM4 = new SubMenuM4();
subMenuM4.setVisible(true);
} else if (e.getSource() == Credits) {
String desc;
desc = "Author : Kayel Calleja\nNotes : Dr Patrick Schembri, -Databases, -System Analysis and Design";
JOptionPane.showMessageDialog(null, desc, "Credits", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == Module7) {
subMenuM7 = new SubMenuM7();
subMenuM7.setVisible(true);
}
}
class SubMenuM7 extends JFrame implements ActionListener{
private JButton SAD;
private SubMenuSAD subMenuSAD;
private JButton LC;
private SubMenuLC subMenuLC;
public SubMenuM7(){
super("Module 7 Menu");
SAD = new JButton("System Analysis and Design");
SAD.addActionListener(this);
LC = new JButton("Life Cycle");
LC.addActionListener(this);
JPanel buttonPanel = new JPanel(new GridLayout(2, 1, 10, 5));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 7, 5, 7));
buttonPanel.add(SAD);
buttonPanel.add(LC);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(buttonPanel, BorderLayout.CENTER);
setSize(400, 140);
setLocationRelativeTo(null);
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == SAD) {
subMenuSAD = new SubMenuSAD();
subMenuSAD.setVisible(true);
} else if (e.getSource() == LC) {
subMenuLC = new SubMenuLC();
subMenuLC.setVisible(true);
}
}
class SubMenuSAD extends JFrame implements ActionListener{
private JButton Analysis;
private JButton Design;
private JButton Analyst;
private JButton Overview;
public SubMenuSAD(){
super ("System Analysis and Design Menu");
Analysis = new JButton("Analysis");
Analysis.addActionListener(this);
Design = new JButton("Design");
Design.addActionListener(this);
Analyst = new JButton("Systems Analyst");
Analyst.addActionListener(this);
Overview = new JButton("Overview");
Overview.addActionListener(this);
JPanel buttonPanel = new JPanel(new GridLayout(2, 1, 10, 5));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 7, 5, 7));
buttonPanel.add(Analysis);
buttonPanel.add(Design);
buttonPanel.add(Analyst);
buttonPanel.add(Overview);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(buttonPanel, BorderLayout.CENTER);
setSize(400, 140);
setLocationRelativeTo(null);
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == Analysis) {
String[] messages = {
"System Analysis is the process of :\n- Investigating a system,\n- Identifying problems,\n- Using the information to recommend improvements to the system.",
"In simplest terms, the analysis specifies what the system should do, while\ndesign focuses on how to accomplish the objective of the system."
};
String title = "System Analysis";
int index = 0;
while (true) {
int option = JOptionPane.showOptionDialog(
null, messages[index], title, JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null,
new String[]{"🡠", "🡢"}, "Next"
);
if (option == JOptionPane.CLOSED_OPTION) {
// User closed the dialog
break;
} else if (option == 0 && index > 0) {
index--;
} else if (option == 1) {
if (index == messages.length - 1) {
// If the user pressed "🡢" at the last message, do not increment index
continue;
} else {
index++;
}
}
}
} else if (e.getSource() == Design) {
String[] messages = {
"System Design is the process of planning a new business system,\neither by replacing an old system completely or\nby updating and complementing the current system in order to improve upon it.",
"It is essential that before this stage can be done, the current, old system,\nneeds to be thoroughly investigated so that any limitations can be clearly identified.",
"Based on these limitations, the needed improvements can then be\ndesigned and it can be assessed whether the process can be made more effective.",
};
String title = "System Design";
int index = 0;
while (true) {
int option = JOptionPane.showOptionDialog(
null, messages[index], title, JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null,
new String[]{"🡠", "🡢"}, "Next"
);
if (option == JOptionPane.CLOSED_OPTION) {
// User closed the dialog
break;
} else if (option == 0 && index > 0) {
index--;
} else if (option == 1) {
if (index == messages.length - 1) {
// If the user pressed "🡢" at the last message, do not increment index
continue;
} else {
index++;
}
}
}
} else if (e.getSource() == Analyst) {
String[] messages = {
"The primary responsibility is to bridge the gap between business needs\n and the technical aspects of the system development.\n Some tasks include :",
"Requirements Gathering : Collecting and documenting detailed requirements\nfrom all stakeholders. Involves conducting interviews, surveys, etc.",
"Requirement Analysis : Analyse the gathered data to prioritize, resolve conflicts, etc.",
"System Design : Creating system models, such as DFD, ERD, etc.",
"Data Modelling : Designing the database schema, defining data structuresm etc.",
"Process Modelling : Model and document business processes to understand\nhow data and activites flow, for instance flowcharts.",
"Feasibility Analysis : Assess the feasibility of proposed systems,\n considering technical, operational, and economic factors.",
"System Testing : Test planning, test case development.",
"Documentation : Create various documentation, including system requirements,\ndocuments, user manuals."
};
String title = "System Analyst";
int index = 0;
while (true) {
int option = JOptionPane.showOptionDialog(
null, messages[index], title, JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null,
new String[]{"🡠", "🡢"}, "Next"
);
if (option == JOptionPane.CLOSED_OPTION) {
// User closed the dialog
break;
} else if (option == 0 && index > 0) {
index--;
} else if (option == 1) {
if (index == messages.length - 1) {
// If the user pressed "🡢" at the last message, do not increment index
continue;
} else {
index++;
}
}
}
} else if (e.getSource() == Overview) {
String[] messages = {
"System Analysis and Design (SAD) is a broad term for describing\nmethodologies for developing high quality Information System.",
"A SAD methodology can also be referred to as a Systems Development\nLife Cycle (SDLC) that includes the development process as well as the\nongoing maintenance process.",
"The classic SAD methodology is the waterfall model which was originally\nconceived for the software development.",
"System Analysis and Design is the process whereby a business situation is\nexamined with the intent of improving and redesigning it completely\nthrough better procedures and methods.",
"System development usually have two major components :\n- System Analysis\n- System Design.",
};
String title = "Overview of the System";
int index = 0;
while (true) {
int option = JOptionPane.showOptionDialog(
null, messages[index], title, JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null,
new String[]{"🡠", "🡢"}, "Next"
);
if (option == JOptionPane.CLOSED_OPTION) {
// User closed the dialog
break;
} else if (option == 0 && index > 0) {
index--;
} else if (option == 1) {
if (index == messages.length - 1) {
// If the user pressed "🡢" at the last message, do not increment index
continue;
} else {
index++;
}
}
}
}
}
}
class SubMenuLC extends JFrame implements ActionListener{
private JButton Stages;
private JButton Models;
private SubMenuLCM subMenuLCM;
public SubMenuLC(){
super("Life Cycle Menu");
Stages = new JButton("Stages of System Life Cycle");
Stages.addActionListener(this);
Models = new JButton("Life Cycle Models");
Models.addActionListener(this);
JPanel buttonPanel = new JPanel(new GridLayout(2, 1, 10, 5));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 7, 5, 7));
buttonPanel.add(Stages);
buttonPanel.add(Models);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(buttonPanel, BorderLayout.CENTER);
setSize(400, 140);
setLocationRelativeTo(null);
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == Stages) {
String[] messages = {
"The System Life Cycle is the complete cycle of activies involved\nin the creation of a new or modified computer system.",
"Each stage is composed of a certain well defined activites,\nand responsibilities, which must be completed before the next stage begins, following a linear, sequential approach.",
"The System life cycle stages include :\n- Problem Definition\n- Feasibility Study\n- Requirements Elicitation\n- Analysis\n- Design\n- Implementation\n- Testing\n- Maintenance\n- Retirement",
};
String title = "Main Stages of System Life Cycle";
int index = 0;
while (true) {
int option = JOptionPane.showOptionDialog(
null, messages[index], title, JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null,
new String[]{"🡠", "🡢"}, "Next"
);
if (option == JOptionPane.CLOSED_OPTION) {
// User closed the dialog
break;
} else if (option == 0 && index > 0) {
index--;
} else if (option == 1) {
if (index == messages.length - 1) {
// If the user pressed "🡢" at the last message, do not increment index
continue;
} else {
index++;
}
}
}
} else if (e.getSource() == Models) {
subMenuLCM = new SubMenuLCM();
subMenuLCM.setVisible(true);
}
}
class SubMenuLCM extends JFrame implements ActionListener{
private JButton Waterfall;
private SubMenuWM subMenuWM;
public SubMenuLCM(){
super("Life Cycle Models Menu");
Waterfall = new JButton("Waterfall");
Waterfall.addActionListener(this);
JPanel buttonPanel = new JPanel(new GridLayout(2, 1, 10, 5));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 7, 5, 7));
buttonPanel.add(Waterfall);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(buttonPanel, BorderLayout.CENTER);
setSize(400, 140);
setLocationRelativeTo(null);
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == Waterfall) {
subMenuWM = new SubMenuWM();
subMenuWM.setVisible(true);
}
}
class SubMenuWM extends JFrame implements ActionListener{
private JButton Generic;
private JButton Stages;
private JButton Adv;
private JButton Dadv;
public SubMenuWM(){
super ("Waterfall Model Menu");
Generic = new JButton("Generic");
Generic.addActionListener(this);
Stages = new JButton("Stages");
Stages.addActionListener(this);
Adv = new JButton("Advantages");
Adv.addActionListener(this);
Dadv = new JButton("Disadvantages");
Dadv.addActionListener(this);
JPanel buttonPanel = new JPanel(new GridLayout(2, 1, 10, 5));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 7, 5, 7));
buttonPanel.add(Generic);
buttonPanel.add(Stages);
buttonPanel.add(Adv);
buttonPanel.add(Dadv);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(buttonPanel, BorderLayout.CENTER);
setSize(400, 140);
setLocationRelativeTo(null);
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == Generic) {
String[] messages = {
"The Waterfall Model is a traditional and linear approach\nto software development and project management.",
"It is characterized by a sequential and structured process with distinct\nphases, each of which must be completed before moving on to the next.",
"The Waterfall Model is often used in situations where the project\nrequirements are well-defined and unlikely to change significantly\nduring the development process.",
"In response to the percieved problems with the 'pure' waterfall model,\nmany modified waterfall models have been introduced.",
"These models may address some or all of the critcisms of the 'pure' waterfall model."
};
String title = "Generic Watefall Model";
int index = 0;
while (true) {
int option = JOptionPane.showOptionDialog(
null, messages[index], title, JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null,
new String[]{"🡠", "🡢"}, "Next"
);
if (option == JOptionPane.CLOSED_OPTION) {
// User closed the dialog
break;
} else if (option == 0 && index > 0) {
index--;
} else if (option == 1) {
if (index == messages.length - 1) {
// If the user pressed "🡢" at the last message, do not increment index
continue;
} else {
index++;
}
}
}
} else if (e.getSource() == Stages) {
String[] messages = {
"Requirements Gathering and Analysis : The project team works closely\nwith stakeholders to gather and document detailed requirements.",
"System Design : The system architecture, data structures, algorithms, and\n overall design are developed. The goal is to create a blueprint\nof the system's structure.",
"Implementation (Coding) : Actual coding and programming of the system based on the design specifications.\nThis phase involves translating the design into executable code.",
"Testing : The software is tested rigorously to identify and fix any defects or issues.\nSuch as unit testing, integration testing, system testing,\nand user acceptance testing.",
"Deployment : Once the software is fully tested and approved,\nit is deployed to the production environment\nor delivered to the client for installation.",
"Maintenance and Support : After deployment, the system enters the maintenance phase.\nIn this phase, ongoing support, bug fixes, updates,\nand enhancements are provided as needed."
};
String title = "Stages of the Waterfall Method";
int index = 0;
while (true) {
int option = JOptionPane.showOptionDialog(
null, messages[index], title, JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null,
new String[]{"🡠", "🡢"}, "Next"
);
if (option == JOptionPane.CLOSED_OPTION) {
// User closed the dialog
break;
} else if (option == 0 && index > 0) {
index--;
} else if (option == 1) {
if (index == messages.length - 1) {
// If the user pressed "🡢" at the last message, do not increment index
continue;
} else {
index++;
}
}
}
} else if (e.getSource() == Adv) {
String[] messages = {
"Clear Requirements : The Waterfall Model is most effective when project requirements are well-defined and unlikely to change.\nIt forces stakeholders to think through and document requirements thoroughly at the beginning of the project.",
"Structured Approach : It provides a clear and structured approach to software\ndevelopment, with each phase having its own well-defined goals and deliverables.",
"Easy to Manage : Project management is simplified because each phase must be completed\nbefore moving to the next, making it easier to track progress.",
"Documentation : Extensive documentation is produced at each stage,\nmaking it easier for future maintenance and reference."
};
String title = "Advantages of the Waterfall Model";
int index = 0;
while (true) {
int option = JOptionPane.showOptionDialog(
null, messages[index], title, JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null,
new String[]{"🡠", "🡢"}, "Next"
);
if (option == JOptionPane.CLOSED_OPTION) {
// User closed the dialog
break;
} else if (option == 0 && index > 0) {
index--;
} else if (option == 1) {
if (index == messages.length - 1) {
// If the user pressed "🡢" at the last message, do not increment index
continue;
} else {
index++;
}
}
}
} else if (e.getSource() == Dadv) {
String[] messages = {
"Inflexibility : Inflexibility when it comes to accommodating changes in requirements.\nIf there is a change late in the project, it can be\nchallenging and expensive to implement.",
"Long Delivery Time : Because each phase must be completed before moving on,\nit can result in longer delivery times, which may not be acceptable\nfor rapidly changing markets.",
"Limited Stakeholder Involvement : Stakeholders are typically involved only at the beginning and the end of the project.\nThis limited involvement can lead to misunderstandings and dissatisfaction with the final product.",
"High Risk : The risk is higher because the project's success depends heavily on\nthe accuracy and completeness of the initial requirements analysis.",
"Not Suitable for Complex Projects : It may not be suitable for complex or\ninnovative projects where requirements are likely to change or are not\nwell understood at the outset.",
"No Working Prototype Until Late : Clients don't see a working prototype until the later stages of the project, which means that any misunderstandings\nor misinterpretations of requirements are discovered late in the process.",
"Customer Feedback : Limited customer feedback during development\ncan result in a product that doesn't fully meet the customer's needs and expectations.",
};
String title = "Disadvantages of the Waterfall Model";
int index = 0;
while (true) {
int option = JOptionPane.showOptionDialog(
null, messages[index], title, JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null,
new String[]{"🡠", "🡢"}, "Next"
);
if (option == JOptionPane.CLOSED_OPTION) {
// User closed the dialog
break;
} else if (option == 0 && index > 0) {
index--;
} else if (option == 1) {
if (index == messages.length - 1) {
// If the user pressed "🡢" at the last message, do not increment index
continue;
} else {
index++;
}
}
}
}
}
}
}
}
}
class SubMenuM4 extends JFrame implements ActionListener{
private JButton OS;
private SubMenuOS subMenuOS;
public SubMenuM4(){
super("Module 4 Menu");
OS = new JButton("Operating Systems");
OS.addActionListener(this);
JPanel buttonPanel = new JPanel(new GridLayout(2, 1, 10, 5));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 7, 5, 7));
buttonPanel.add(OS);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(buttonPanel, BorderLayout.CENTER);
setSize(400, 140);
setLocationRelativeTo(null);
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == OS) {
subMenuOS = new SubMenuOS();
subMenuOS.setVisible(true);
}
}
class SubMenuOS extends JFrame implements ActionListener{
private JButton TOS;
private SubMenuTOS subMenuTOS;
private JButton PControl;
private SubMenuPC subMenuPC;
private JButton JControl;
private SubMenuJC subMenuJC;
public SubMenuOS(){
super("Operating Systems Menu");
TOS = new JButton("Types of OS");
TOS.addActionListener(this);
PControl = new JButton("Process Control Operations");
PControl.addActionListener(this);
JControl = new JButton("Job Control Languages");
JControl.addActionListener(this);
JPanel buttonPanel = new JPanel(new GridLayout(2, 1, 10, 5));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 7, 5, 7));
buttonPanel.add(TOS);
buttonPanel.add(PControl);
buttonPanel.add(JControl);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(buttonPanel, BorderLayout.CENTER);
setSize(400, 140);
setLocationRelativeTo(null);
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == TOS) {
subMenuTOS = new SubMenuTOS();
subMenuTOS.setVisible(true);
} else if (e.getSource() == PControl) {
subMenuPC = new SubMenuPC();
subMenuPC.setVisible(true);
} else if (e.getSource() == JControl) {
subMenuJC = new SubMenuJC();
subMenuJC.setVisible(true);
}
}
class SubMenuJC extends JFrame implements ActionListener{
private JButton Definitions;
private SubMenuJCD subMenuJCD;
private JButton Description;
public SubMenuJC(){
super("Job Control Languages Menu");
Definitions = new JButton("Definitions");
Definitions.addActionListener(this);
Description = new JButton("Description");
Description.addActionListener(this);
JPanel buttonPanel = new JPanel(new GridLayout(2, 1, 10, 5));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 7, 5, 7));
buttonPanel.add(Description);
buttonPanel.add(Definitions);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(buttonPanel, BorderLayout.CENTER);
setSize(400, 140);
setLocationRelativeTo(null);
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == Description) {
String explanation, explanation2;
explanation = "Job Control Language (JCL) is a scripting language used on mainframe operating systems, particularly IBM's z/OS.\nJCL is essential for managing and controlling batch processing on these systems.";
explanation2 = "In summary, Job Control Language (JCL) is a powerful tool for managing and controlling batch processing on mainframe operating systems.\nIt allows users to define, schedule, and automate jobs, allocate resources, manage data, and handle errors, providing a structured and efficient way to execute complex tasks.";
JOptionPane.showMessageDialog(null, explanation, "JCL Explanation", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(null, explanation2, "JCL Summary", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == Definitions) {
subMenuJCD = new SubMenuJCD();
subMenuJCD.setVisible(true);
}
}
class SubMenuJCD extends JFrame implements ActionListener{
private JButton BProc;
private JButton JobD;
private JButton JobC;
private JButton Resource;
private JButton DataM;
private JButton DepenM;
private JButton ErrHand;
private JButton Scheduling;
private JButton Automation;
public SubMenuJCD(){
super("Job Control Language Definitions Menu");
BProc = new JButton("Batch Processing");
BProc.addActionListener(this);
JobD = new JButton("Job Definition");
JobD.addActionListener(this);
JobC = new JButton("Job Control Statements");
JobC.addActionListener(this);
Resource = new JButton("Resource Allocation");
Resource.addActionListener(this);
DataM = new JButton("Data Management");
DataM.addActionListener(this);
DepenM = new JButton("Dependency Management");
DepenM.addActionListener(this);
ErrHand = new JButton("Error Handling");
ErrHand.addActionListener(this);
Scheduling = new JButton("Job Scheduling");
Scheduling.addActionListener(this);
Automation = new JButton("Automation");
Automation.addActionListener(this);
JPanel buttonPanel = new JPanel(new GridLayout(5, 1, 10, 5));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 7, 5, 7));
buttonPanel.add(BProc);
buttonPanel.add(JobD);
buttonPanel.add(JobC);
buttonPanel.add(Resource);
buttonPanel.add(DataM);
buttonPanel.add(DepenM);
buttonPanel.add(ErrHand);
buttonPanel.add(Scheduling);
buttonPanel.add(Automation);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(buttonPanel, BorderLayout.CENTER);
setSize(400, 210);
setLocationRelativeTo(null);
}
public void actionPerformed(ActionEvent e){
if (e.getSource() == BProc) {
String explanation;
explanation = "JCL is primarily used for defining and controlling batch jobs.\nBatch processing involves the execution of a series of jobs or programs without manual intervention.\nJCL specifies the sequence of programs to be executed, their input and output files, and other necessary parameters.";
JOptionPane.showMessageDialog(null, explanation, "Batch Processing Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == JobD) {
String explanation;
explanation = "JCL is used to define a job, which is a unit of work or a set of related tasks that need to be executed together.\nA job typically consists of one or more programs or procedures, along with the necessary data and control statements.";
JOptionPane.showMessageDialog(null, explanation, "Job Definition Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == JobC) {
String explanation;
explanation = "JCL includes statements that provide control information to the operating system.\nThese statements specify details such as program names, input and output files,\nsystem resources required, and other job-related parameters.";
JOptionPane.showMessageDialog(null, explanation, "Job Control Statements Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == DataM) {
String explanation;
explanation = "JCL is used to manage data within a job.\nIt specifies the input data sets that programs will use and defines the output data sets where program results will be stored.\nThis includes information about data organization, record format, and file attributes.";
JOptionPane.showMessageDialog(null, explanation, "Data Management Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == DepenM) {
String explanation;
explanation = "JCL allows the definition of dependencies between different jobs.\nThis ensures that certain jobs only run after the successful completion of others,\ncreating a logical sequence of execution.";
JOptionPane.showMessageDialog(null, explanation, "Dependency Management Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == Resource) {
String explanation;
explanation = "JCL is used to allocate the necessary resources for a job,\nincluding specifying the amount of CPU time, memory,\nand other system resources required for successful execution.";
JOptionPane.showMessageDialog(null, explanation, "Resource Allocation Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == ErrHand) {
String explanation;
explanation = "JCL includes mechanisms for handling errors during job execution.\nIt allows for the definition of procedures to be followed in case of errors, such as rerouting output,\nrestarting the job, or terminating the job with a specific return code.";
JOptionPane.showMessageDialog(null, explanation, "Error Handling Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == Scheduling) {
String explanation;
explanation = "JCL is often integrated with job scheduling systems.\nIt allows users to specify when a job should be executed, based on factors such as time of day, day of the week, or other criteria.\nThis helps in optimizing resource utilization and meeting business requirements.";
JOptionPane.showMessageDialog(null, explanation, "Job Scheduling Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == Automation) {
String explanation;
explanation = "JCL plays a crucial role in automating repetitive tasks and large-scale data processing.\nBy defining jobs and their associated parameters, users can automate the execution of complex processes without manual intervention.";
JOptionPane.showMessageDialog(null, explanation, "Automation Explanation", JOptionPane.INFORMATION_MESSAGE);
}
}
}
}
class SubMenuPC extends JFrame implements ActionListener{
private JButton CT;
private JButton Scheduling;
private JButton State;
private JButton SyncComm;
private JButton IntHand;
private JButton Resource;
private JButton Exec;
private JButton ErrHand;
public SubMenuPC(){
super("Process Control Operations Menu");
CT = new JButton("Creation and Termination");
CT.addActionListener(this);
Scheduling = new JButton("Scheduling");
Scheduling.addActionListener(this);
State = new JButton("State Changes");
State.addActionListener(this);
SyncComm = new JButton("Sync and Communication");
SyncComm.addActionListener(this);
IntHand = new JButton("Interrupt Handling");
IntHand.addActionListener(this);
Resource = new JButton("Resource De/Allocation");
Resource.addActionListener(this);
Exec = new JButton("Execution Control");
Exec.addActionListener(this);
ErrHand = new JButton("Error Handling");
ErrHand.addActionListener(this);
JPanel buttonPanel = new JPanel(new GridLayout(4, 1, 10, 5));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 7, 5, 7));
buttonPanel.add(CT);
buttonPanel.add(State);
buttonPanel.add(Scheduling);
buttonPanel.add(SyncComm);
buttonPanel.add(IntHand);
buttonPanel.add(Resource);
buttonPanel.add(Exec);
buttonPanel.add(ErrHand);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(buttonPanel, BorderLayout.CENTER);
setSize(400, 200);
setLocationRelativeTo(null);
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == CT) {
String explanation, explanation2;
explanation = "Creation : The operating system is responsible for creating new processes.\nThis involves allocating the necessary resources, setting up data structures,\nand initializing the process control block (PCB), which contains information about the process.";
explanation2 = "Termination : When a process completes its execution or is no longer needed, the operating system terminates the process.\nThis involves releasing allocated resources, deallocating memory, and updating relevant data structures.";
JOptionPane.showMessageDialog(null, explanation, "Creation Explanation", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(null, explanation2, "Termination Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == Scheduling) {
String explanation;
explanation = "The operating system must decide which process to execute next from the pool of ready processes.\nThis decision is made by the scheduler, which employs scheduling algorithms to determine the order in which processes will be executed on the CPU.";
JOptionPane.showMessageDialog(null, explanation, "Scheduling Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == State) {
String explanation;
explanation = "Processes go through different states during their lifecycle, such as new, ready, running, blocked, and terminated.\nProcess control operations involve transitioning processes between these states based on events and conditions.";
JOptionPane.showMessageDialog(null, explanation, "State Changes Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == SyncComm) {
String explanation;
explanation = "Processes may need to synchronize their execution or communicate with each other.\nOperating systems provide mechanisms like semaphores, mutexes,\nand inter-process communication (IPC) facilities to enable synchronization and communication between processes.";
JOptionPane.showMessageDialog(null, explanation, "Synchronization and Communication Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == IntHand) {
String explanation;
explanation = "Interrupts are signals generated by hardware or software to interrupt the normal execution of a process.\nThe operating system must handle interrupts efficiently, saving the context of the interrupted process and executing an appropriate interrupt service routine.";
JOptionPane.showMessageDialog(null, explanation, "Interrupt Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == Resource) {
String explanation;
explanation = "The operating system manages resources such as CPU time, memory, and I/O devices.\nProcess control operations include allocating resources to processes as they need them and deallocating resources when they are no longer required.";
JOptionPane.showMessageDialog(null, explanation, "Resource Allocation and Deallocation Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == Exec) {
String explanation;
explanation = "The operating system has mechanisms to control the execution of processes.\nThis includes the ability to pause, resume, or abort the execution of a process.";
JOptionPane.showMessageDialog(null, explanation, "Execution Control Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == ErrHand) {
String explanation;
explanation = "Processes may encounter errors during execution.\nThe operating system is responsible for detecting and handling errors,\nwhich may involve terminating the faulty process or taking corrective actions.";
JOptionPane.showMessageDialog(null, explanation, "Creation Explanation", JOptionPane.INFORMATION_MESSAGE);
}
}
}
class SubMenuTOS extends JFrame implements ActionListener{
private JButton Batch;
private JButton Online;
private JButton Realtime;
private JButton Network;
public SubMenuTOS(){
super("Types Of Operating Systems Menu");
Batch = new JButton("Batch");
Batch.addActionListener(this);
Online = new JButton("On-line");
Online.addActionListener(this);
Realtime = new JButton("Real-time");
Realtime.addActionListener(this);
Network = new JButton("Network");
Network.addActionListener(this);
JPanel buttonPanel = new JPanel(new GridLayout(2, 1, 10, 5));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 7, 5, 7));
buttonPanel.add(Batch);
buttonPanel.add(Online);
buttonPanel.add(Realtime);
buttonPanel.add(Network);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(buttonPanel, BorderLayout.CENTER);
setSize(400, 140);
setLocationRelativeTo(null);
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == Network) {
String explanation, explanation2, explanation3;
explanation = "Function : Network operating systems are designed to manage and coordinate the activities of multiple computers within a network.\nThey facilitate communication, resource sharing, and data exchange among connected devices.";
explanation2 = "Specifics : Network operating systems provide features like file sharing, printer sharing, and centralized user authentication.\nExamples include Novell NetWare and Microsoft Windows Server.";
explanation3 = "Differences : Network operating systems are focused on facilitating communication and resource sharing in a networked environment.\nThey may incorporate elements of batch, on-line, or real-time processing depending on the specific needs of the networked applications.";
JOptionPane.showMessageDialog(null, explanation, "Network Explanation", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(null, explanation2, "Network Explanation", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(null, explanation3, "Network Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == Online) {
String explanation, explanation2, explanation3;
explanation = "Function : Online operating systems, also known as time-sharing systems, allow multiple users to interact with the computer simultaneously.\nEach user gets a small portion of the CPU time.";
explanation2 = "Specifics : Users can interact with the system through terminals,\nand the operating system rapidly switches between tasks to give the illusion of simultaneous execution.";
explanation3 = "Differences : On-line systems provide a more interactive experience compared to batch systems.\nThey are suitable for scenarios where multiple users need concurrent access to the system,\nsuch as in business offices or educational institutions.";
JOptionPane.showMessageDialog(null, explanation, "On-line Explanation", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(null, explanation2, "On-line Explanation", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(null, explanation3, "On-line Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == Realtime) {
String explanation, explanation2, explanation3;
explanation = "Function : Real-time operating systems are designed to respond to events or inputs within a specified time frame.\nThey are crucial in applications where timely and predictable responses are critical.";
explanation2 = "Specifics : Real-time systems are classified into hard and soft real-time.\nHard real-time systems must meet strict deadlines,\nwhile soft real-time systems have some flexibility in meeting deadlines.";
explanation3 = "Differences : Real-time systems are used in applications like medical devices, aerospace systems, and industrial control systems where timing is crucial.\nThey differ from batch and on-line systems in their focus on immediate response and predictability.";
JOptionPane.showMessageDialog(null, explanation, "Realtime Explanation", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(null, explanation2, "Realtime Explanation", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(null, explanation3, "Realtime Explanation", JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == Batch) {
String explanation, explanation2, explanation3;
explanation = "Function : Batch operating systems are designed to process tasks in batches without user interaction.\nUsers submit their jobs, and the operating system collects and processes them in groups.";
explanation2 = "Specifics : Jobs are usually stored in a job queue and processed sequentially.\nThe system moves from one job to the next without user intervention.";
explanation3 = "Differences : Batch systems are less interactive and more suitable for tasks that can be automated and don't require constant user input.\nThey are commonly used in business and scientific environments.";
JOptionPane.showMessageDialog(null, explanation, "Batch Explanation", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(null, explanation2, "Batch Explanation", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(null, explanation3, "Batch Explanation", JOptionPane.INFORMATION_MESSAGE);
}
}
}
}
}
class SubMenuM2 extends JFrame implements ActionListener{
private JButton Memory;