Upcoming SlideShare
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

# Saving this for later?

### Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Standard text messaging rates apply

# csc 208

521
views

Published on

abc

abc

Published in: Technology

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total Views
521
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
0
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Transcript

• 1. Introduction Kindergarten Enrolment Subsystem
• 2. UML Class Diagram
• 3. UML Use Case Diagram
• 4. Cyclomatic Complexity
• public void actionPerformed (ActionEven Event){1
• if (event.getSource()==NewBut) {
• SearchStudent form = new SearchStudent();
• }2
• }
• If(event.getSource()==ResetBut){3
• txtCalPrice1.setText(“0”);
• txtCalPrice2.setText(“0”);
• txtCalPrice3.setText(“0”);
• txtAmountPay.setText(“0”);
• }
• String input1=txtCalPrice1.getText();
• String input2=txtCalPrice2.getText();4
• String input3=txtCalPrice3.getText();
• String input4=txtAmountPay.getText();
• int num1;i
• int num2;
• int num3;
• int AmountPay;
• int subtotal=0;
• int fullAmount=0;5
• num1=Integer.parseInt(input1);
• num2=Integer.parseInt(input2);
• num3=Integer.parseInt(input3);
• subTotal=num1+num2+num3;6
• if (event.getSource()==CalculateBut){
• txtsubTotal.setText(“RM “+subtotal);
• }7
• AmountPay = Integer.parseInt (input4);8
• fullAmount = AmountPay – subtotal;9
• public void main (String args[]){
• Calculate design = new Calculate();
• Design.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
• }
• }
• 5. 10 9 8 7 6 5 4 3 2 1 R1 R2 R3 R4 R5 P1 P2 P3 P4
• 6. Design Pattern
• Creational Pattern
• The Builder Pattern
• The creational pattern describes the best way to create instance of objects.
• The Builder Pattern is used when each portion of the codes are devided to complete each task.
• Separates the construction of complex objects from their representation.
• Derived from searchStudent()
• public void actionPerformed(ActionEvent event){
• form.setVisible(true);
• }
• if(event.getSource()==newButton){
• form.setVisible(true);
• } //call calculate record
• 7.
• public void actionPerformed(ActionEven event){
• nt){
• String input1=txtCalPrice1.getText();
• String input2=txtCalPrice2.getText();
• String input3=txtCalPrice3.getText();
• String input4=txtCalPrice4.getText();
• String input5=txtAmountPAy.getText();
• int num1;
• int num2;
• int num3;
• int num4;
• int subTotal=0;
• int AmountPay;
• int fullAmount=0;
• num1=Integer.parseInt(input1);
• num2=Integer.parseInt(input2);
• num3=Integer.parseInt(input3);
• num4=Integer.parseInt(input4);
• subTotal=num1+num2+num3+num4;
• if(event.getSource()==CalculateBut){
• txtSubTotalAmount.setText(&quot;RM &quot;+subTotal);
• } //subtotal
• AmountPay=Integer.parseInt(input5);
• fullAmount=AmountPay-subTotal;
• if(event.getSource()==CalculateChargeBut){
• 1a1BackCharge.setText(&quot;RM &quot;+fullAmount);
• } //on charge amount in back charge
• }
• 8. Structural Pattern
• This patterns advantage is it makes unrelated or irrelevant of interface class work together which then will support multiple compatibility.
• public class subOffer extends JFrame implements ActionListener{
• public subOffer(){
• JPanel p5=new JPanel();
• public void actionPerformed(ActionEvent event){
• this.setVisible(true);
• }
• The Facade Pattern hides what is happening behind the program but only display what its supposed to do. It allows user to change the codes without requiring changes in the client code.
• if (event.getSource()==Search{
• String number=txtNum.getText();
• if(number.equals(&quot;1&quot;)){
• 1a1StudentName.setText(&quot;Rachele Regis&quot;);
• 1a1StudentAge.setText(&quot;4&quot;);
• 1a1GuardianNumber.setTest(&quot;012-3456789&quot;);
• 1a1Date1.setText(&quot;26/3/2006&quot;);
• 1a1StudentStatus1.setText(&quot;Enrolled&quot;);
• newButton.setVisible(true);
• txtNum.setText(&quot;&quot;);
• 10. Behavior Pattern
• Chain of Responsibility
• A communication between objects that permit number of classes to handle a number of request without knowing the capacity or working of another class.
• Would be to handle and manipulate one or more object. It also reduces the coupling between classes. It gives user the added flexibility in distributing responsibilities between objects.
• 11.
• Derived from searchStudent()
• if(event.getSource()==EnrolButton){
• this.setVisible(false);
• enrolStudent form=new enrolStudent(); // Goes enrol student form
• form.setVisible(true);
• } //show enrol form
• if(event.getSource()==subOffer){
• this.setVisible(false);
• SubjectOffer form=new SubjectOffer(); //goes subject offered form
• form.setVisible(true);
• }//find subject offered
• if(event.getSource()==Search){
• this.setVisible(false);
• SearchStudent form=new SearchStudent(); //goes search student form
• form.setVisible(true);
• }//call search student form
• }