Introduction Kindergarten Enrolment Subsystem
UML Class Diagram
UML Use Case Diagram
Cyclomatic Complexity <ul><li>public void actionPerformed (ActionEven Event){1 </li></ul><ul><li>if (event.getSource()==Ne...
10 9 8 7 6 5 4 3 2 1 R1 R2 R3 R4 R5 P1 P2 P3 P4
Design Pattern <ul><li>Creational Pattern </li></ul><ul><li>The Builder Pattern </li></ul><ul><li>The creational pattern d...
<ul><li>public void actionPerformed(ActionEven event){ </li></ul><ul><li>nt){ </li></ul><ul><li>String input1=txtCalPrice1...
Structural Pattern <ul><li>Adapter Pattern </li></ul><ul><li>This patterns advantage is it makes unrelated or irrelevant o...
Facade <ul><li>The Facade Pattern hides what is happening behind the program but only display what its supposed to do. It ...
Behavior Pattern <ul><li>Chain of Responsibility </li></ul><ul><li>A communication between objects that permit number of c...
<ul><li>Derived from searchStudent() </li></ul><ul><li>if(event.getSource()==EnrolButton){ </li></ul><ul><li>this.setVisib...
Upcoming SlideShare
Loading in …5
×

csc 208

736 views

Published on

abc

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
736
On SlideShare
0
From Embeds
0
Number of Embeds
17
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

csc 208

  1. 1. Introduction Kindergarten Enrolment Subsystem
  2. 2. UML Class Diagram
  3. 3. UML Use Case Diagram
  4. 4. Cyclomatic Complexity <ul><li>public void actionPerformed (ActionEven Event){1 </li></ul><ul><li>if (event.getSource()==NewBut) { </li></ul><ul><li>SearchStudent form = new SearchStudent(); </li></ul><ul><li>}2 </li></ul><ul><li>If(event.getSource()==MenuBut) { </li></ul><ul><li>Menu form = new Menu(); </li></ul><ul><li>} </li></ul><ul><li>If(event.getSource()==ResetBut){3 </li></ul><ul><li>txtCalPrice1.setText(“0”); </li></ul><ul><li>txtCalPrice2.setText(“0”); </li></ul><ul><li>txtCalPrice3.setText(“0”); </li></ul><ul><li>txtAmountPay.setText(“0”); </li></ul><ul><li>} </li></ul><ul><li>String input1=txtCalPrice1.getText(); </li></ul><ul><li>String input2=txtCalPrice2.getText();4 </li></ul><ul><li>String input3=txtCalPrice3.getText(); </li></ul><ul><li>String input4=txtAmountPay.getText(); </li></ul><ul><li>int num1;i </li></ul><ul><li>int num2; </li></ul><ul><li>int num3; </li></ul><ul><li>int AmountPay; </li></ul><ul><li>int subtotal=0; </li></ul><ul><li>int fullAmount=0;5 </li></ul><ul><li>num1=Integer.parseInt(input1); </li></ul><ul><li>num2=Integer.parseInt(input2); </li></ul><ul><li>num3=Integer.parseInt(input3); </li></ul><ul><li>subTotal=num1+num2+num3;6 </li></ul><ul><li>if (event.getSource()==CalculateBut){ </li></ul><ul><li>txtsubTotal.setText(“RM “+subtotal); </li></ul><ul><li>}7 </li></ul><ul><li>AmountPay = Integer.parseInt (input4);8 </li></ul><ul><li>fullAmount = AmountPay – subtotal;9 </li></ul><ul><li>public void main (String args[]){ </li></ul><ul><li>Calculate design = new Calculate(); </li></ul><ul><li>Design.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>
  5. 5. 10 9 8 7 6 5 4 3 2 1 R1 R2 R3 R4 R5 P1 P2 P3 P4
  6. 6. Design Pattern <ul><li>Creational Pattern </li></ul><ul><li>The Builder Pattern </li></ul><ul><li>The creational pattern describes the best way to create instance of objects. </li></ul><ul><li>The Builder Pattern is used when each portion of the codes are devided to complete each task. </li></ul><ul><li>Separates the construction of complex objects from their representation. </li></ul><ul><li>Derived from searchStudent() </li></ul><ul><li>public void actionPerformed(ActionEvent event){ </li></ul><ul><li>if(event.getSource()==Menubutton){ </li></ul><ul><li>menu form=new menu(); //goes to menu </li></ul><ul><li>form.setVisible(true); </li></ul><ul><li>} </li></ul><ul><li>if(event.getSource()==newButton){ </li></ul><ul><li>form.setVisible(true); </li></ul><ul><li>} //call calculate record </li></ul>
  7. 7. <ul><li>public void actionPerformed(ActionEven event){ </li></ul><ul><li>nt){ </li></ul><ul><li>String input1=txtCalPrice1.getText(); </li></ul><ul><li>String input2=txtCalPrice2.getText(); </li></ul><ul><li>String input3=txtCalPrice3.getText(); </li></ul><ul><li>String input4=txtCalPrice4.getText(); </li></ul><ul><li>String input5=txtAmountPAy.getText(); </li></ul><ul><li>int num1; </li></ul><ul><li>int num2; </li></ul><ul><li>int num3; </li></ul><ul><li>int num4; </li></ul><ul><li>int subTotal=0; </li></ul><ul><li>int AmountPay; </li></ul><ul><li>int fullAmount=0; </li></ul><ul><li>num1=Integer.parseInt(input1); </li></ul><ul><li>num2=Integer.parseInt(input2); </li></ul><ul><li>num3=Integer.parseInt(input3); </li></ul><ul><li>num4=Integer.parseInt(input4); </li></ul><ul><li>subTotal=num1+num2+num3+num4; </li></ul><ul><li>if(event.getSource()==CalculateBut){ </li></ul><ul><li>txtSubTotalAmount.setText(&quot;RM &quot;+subTotal); </li></ul><ul><li>} //subtotal </li></ul><ul><li>AmountPay=Integer.parseInt(input5); </li></ul><ul><li>fullAmount=AmountPay-subTotal; </li></ul><ul><li>if(event.getSource()==CalculateChargeBut){ </li></ul><ul><li>1a1BackCharge.setText(&quot;RM &quot;+fullAmount); </li></ul><ul><li>} //on charge amount in back charge </li></ul><ul><li>} </li></ul>
  8. 8. Structural Pattern <ul><li>Adapter Pattern </li></ul><ul><li>This patterns advantage is it makes unrelated or irrelevant of interface class work together which then will support multiple compatibility. </li></ul><ul><li>public class subOffer extends JFrame implements ActionListener{ </li></ul><ul><li>JButton MenuButton=new JButton(&quot;Menu&quot;); </li></ul><ul><li>public subOffer(){ </li></ul><ul><li>JPanel p5=new JPanel(); </li></ul><ul><li>p5.add(Menubutton); </li></ul><ul><li>Menubutton.setSize(40,20); </li></ul><ul><li>Menubutton.addActionListener(this); </li></ul><ul><li>public void actionPerformed(ActionEvent event){ </li></ul><ul><li>if(event.getSource()==Menubutton){ </li></ul><ul><li>this.setVisible(true); </li></ul><ul><li>} </li></ul>
  9. 9. Facade <ul><li>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. </li></ul><ul><li>if (event.getSource()==Search{ </li></ul><ul><li>String number=txtNum.getText(); </li></ul><ul><li>if(number.equals(&quot;1&quot;)){ </li></ul><ul><li>1a1StudentName.setText(&quot;Rachele Regis&quot;); </li></ul><ul><li>1a1StudentAge.setText(&quot;4&quot;); </li></ul><ul><li>1a1StudentAddress.setText(&quot;No34, Desa Palma&quot;); </li></ul><ul><li>1a1GuardianName.setTest(&quot;Madhu&quot;); </li></ul><ul><li>1a1GuardianNumber.setTest(&quot;012-3456789&quot;); </li></ul><ul><li>1a1Date1.setText(&quot;26/3/2006&quot;); </li></ul><ul><li>1a1StudentStatus1.setText(&quot;Enrolled&quot;); </li></ul><ul><li>newButton.setVisible(true); </li></ul><ul><li>txtNum.setText(&quot;&quot;); </li></ul>
  10. 10. Behavior Pattern <ul><li>Chain of Responsibility </li></ul><ul><li>A communication between objects that permit number of classes to handle a number of request without knowing the capacity or working of another class. </li></ul><ul><li>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. </li></ul>
  11. 11. <ul><li>Derived from searchStudent() </li></ul><ul><li>if(event.getSource()==EnrolButton){ </li></ul><ul><li>this.setVisible(false); </li></ul><ul><li>enrolStudent form=new enrolStudent(); // Goes enrol student form </li></ul><ul><li>form.setVisible(true); </li></ul><ul><li>} //show enrol form </li></ul><ul><li>if(event.getSource()==subOffer){ </li></ul><ul><li>this.setVisible(false); </li></ul><ul><li>SubjectOffer form=new SubjectOffer(); //goes subject offered form </li></ul><ul><li>form.setVisible(true); </li></ul><ul><li>}//find subject offered </li></ul><ul><li>if(event.getSource()==Search){ </li></ul><ul><li>this.setVisible(false); </li></ul><ul><li>SearchStudent form=new SearchStudent(); //goes search student form </li></ul><ul><li>form.setVisible(true); </li></ul><ul><li>}//call search student form </li></ul><ul><li>} </li></ul>

×