Introduction
This is the second phase of this project which centres on the implementation of the system investigated in the first phase.
This project involved the development of a good computer-aided learning application or package that would facilitate the teaching of Boolean logic and logic circuit to high school students and first year undergraduate students. The application is designed to offer the users, a comprehensive set of lessons and tutorial exercises that will help them in learning the rudiments and fundamentals of Boolean logic/algebra and logic circuit.
The key techniques which this application development adopted were:
· Computer aided learning(CAL)
· Event-driven programming Language
· Human computer interaction
· Software Development
· Boolean Algebra and Logic Circuits
Aims of the Project
The aim of this project is to investigate the use of CAL in education and the use of an Event-driven Programming Language to:
· Develop a suitable set of tutorials that will teach users the basic fundamentals of Boolean algebra/logic and logic circuit.
· Develop a suitable logic circuit simulation
· Develop an application using an Event-driven programming Language.
Objective
The objective of this project is to develop a good interactive system that will be able to teach the rudiments and fundamentals of Boolean logic and logic circuits.
It is expected that after going through the lessons created, the users would have had a good fundamental knowledge of Boolean algebra and would have prepared the student to be able to proceed with the learning of advanced digital electronics.
Motivation
I am quite challenged to do this project because; it will aid self learning of the subject area of this project. Student will be able to learn about Boolean algebra and logic circuit at their own pace and more easily because the system built is quite interactive where the user can interact with the system via a well designed graphical user interface.
It will serve as a good alternative to the existing modes of teaching the topic which are through slides or textbooks.
Project Specification and design
The project requirement specification is the description of what the delivered system would do. It also includes the constraints on the development process of the system.
These requirements are grouped into two categories:
1. Minimum Functional Requirements: these are the basic functionalities of what the system is meant to achieve and also to provide for the users. The package will offer the user a comprehensive set of lessons and tutorial exercises and including a selection of the following facilities:
A. Truth table completion for Boolean algebraic expression: the user of the system will be able to learn all the different truth table logic combination for the different gates.
For the various logic gates, different logic gates symbols will be used to indicate the gates and the number of inputs for such gates. For every gate with the indicated number of inputs, a truth table will be generated to show the output of the gate for all the different possible combinations of such gate.
There are other gates which could only have two inputs such as exclusive-or gate and exclusive-nor gate. These gates will only have the truth table representation for the only possible number of inputs.
The NOT gate has only one input and one output, therefore, it will only have one truth table to show its operation.
Other gates such as AND, OR, NAND and NOR which could have as many inputs as possible will be represented with symbols for two, three and four inputs. It is assumed that, if the student can clearly get the concept for these three sets of inputs, it will help them to understand the operation of gates with more inputs.
Users will be able to determine the input for the gate and they will be able to see what the output will be for every input selection made. They can also choose to see the input combinations made and the generated output.
These will be displayed in a GUI with a number of GUI components such as text area, checkboxes, buttons and list areas.
The GUI will have a card panel that houses all the different gates which the user can select from to learn about any of them.
For every logic circuit displayed or analyzed, the student will be able to determine the output through the generated system and the truth table creation for the circuit. This will enable the student to have a better grip and understanding of the whole process of truth table creation from gates and logic circuits.
B. Creation of set of lessons and tutorials to teach the fundamentals of Boolean logic: several lessons will be designed to teach the whole process. The lesson design process will be talked about in the project design section.
Lessons will be created for every gate type to educate the student on all features and components of such gates.
Every lesson will be followed with a tutorial practice question for the student to practice with.
The tutorials will be made to be interactive so that the student may find it useful and educative. The tutorial will guide the user on how to perform the required operations and also give feedback to the student for every answer supplied.
C. Graphical representation of logic operation: graphical representation has always been seen as a veritable too in aiding learning. Graphs could be used to make analyses of any operation either Boolean or mathematical. The application to be developed will be able to create a graphical representation of every logic gate and logic circuit operation. The graph will be able to show the input and the output for every gate. For the AND, OR, NAND and NOR gates, the graphical representation will be made for the gates with three inputs. Every other gate with any number of inputs will operate in the same pattern the gate with three inputs will operate. The graphs will be displayed on separate panels and will be made easy to analyze and comprehend.
D. Creating truth tables from user defined Boolean expressions: users will be able to input any Boolean expression and the system will generate the truth table showing all the possible combination of inputs for the expression and the equivalent output.
This will give the user the flexibility to play around with the application and learn more about Boolean expression and its equivalent.
E. Creation of Boolean expressions from Logic gates: it is also expected that, users will be able to learn how to create Boolean expressions from truth table. For any given truth table, the user will be taught how to create a Boolean expression from the table and use such to design a suitable logic gate or circuit.
F. Demonstrating DeMorgan’s theorem, half-adder and full-adder circuits: these are also some of the fundamental of Boolean logic and this project will involve creating some lessons to demonstrate them and a tutorial to practice with.
G. Teachers should be able to add new set of tutorials as at when needed. There will be a teacher’s guide on how more tutorials could be added to the system so that at every point in time, the teacher could improve the standard of the tutorials. A guide to this will be included in the appendix but the teacher will be required to have a good or fundamental knowledge for Java programming language which will be the programming language for the development of the application.
2. Non-Functional Requirements: these are the constraints placed upon the development of the system. These are not system functions
A. Time Constraints: this project is to be delivered within the stipulated given time. The deadline given will be strictly adhered to. This time constraint will be a determining factor in the development of the system because all the development design and implementation will have to fall within the stipulated time.
B. Constraints on the development process: These include the features of the system to be delivered. It takes into consideration the following:
i. Interface design: since this project is meant to be an interactive one where the user can interact with the system, a well designed graphical user interface with features to aid instructiveness and easy manipulation will be required and this project will address and ensure this. A good interface design with the appropriate tools will help in making the system fun and easy to use.
ii. Design of tutorials: the structure in which tutorials will take is quite important as such should be tailored towards effective and easy learning. The system to be designed will take cognizance of this to ensure that tutorials are well structured and tailored towards systemic and intuitive learning.
iii. Efficiency and minimizing the chances of user error: the system will be designed to ensure adequate validation and also, every lesson will be well structured to make sure that the correct outputs are generated for every lesson. This will be enforced during the software testing stage of the project to ensure effective and efficient system.
C. Quality standard constraints: the quality of the delivered system is quite paramount and this deals with the conformity of the system to the specified requirements and that which could pass for an M.Sc standard.
D. Software and Hardware Constraints: for this project, Java programming language will be used as the software developing tool for the system. Any of the standards Java IDE could be used but for this project I will be using netbeans and also, textpad.
Design Objectives
· The developed system which is meant to be an interactive system will interact with the user through the keyboard and mouse.
· There will be a graphical user interface (GUI) to display designed lessons.
Design Goals
· The system will be designed to be user friendly in the sense that, user will be able to determine the pace of learning and navigation through the system will be made simple.
· The use of the system will also be made to be simple enough for every level of users to understand though user will be expected to have prior knowledge of computer as this project does not include the teaching of the use of computer.
Educational Concept, Audience and Lessons Creations
The lessons to be created in this project will be channeled towards teaching high school students who have little or no knowledge of Boolean logic or logic gates and first year undergraduates who chooses to learn the fundamentals of Boolean algebra.
The lessons will be made to be as interactive as possible to aid easy learning and that is why event driving programming will be used in creating the lessons so that the users can decide the sequence of events at their pace.
Lessons will be taken in a progressive way starting with the fundamentals to create a good background of the Boolean logic introducing the truth tables and gates, different gates combinations, theorems of Boolean algebra and circuits. The lessons are meant to advance as they progress.
Tutorials will be created in consonance with the lessons taken to aid more understanding of the concepts.
Prerequisite
To take this lesson, it is expected that the user has a basic knowledge of arithmetic algebra and computer. Since this lesson is channeled towards final year high school students and first year university undergraduates, it is expected that they would have been taught the fundamentals of arithmetic algebra which is part of the contents of high school mathematics curriculum for UK and Nigerian schools that may be the primary users of the system. Knowledge of physics or basic electronics will also be required to aid the handling of circuits which will also be treated in this project.
Design
Two design concepts are being considered for this project. They are educational concept and technical concept. Educational concept is being considered because the system to be developed is meant to be an educational tool to teach Boolean logic so, the system is meant to be designed to be suitable for learning.
Software design deals with the software programming for the actualization of the system. Java was the basic programming language used for the development of the system.
Educational Design
An educational tool is meant to present teaching material in such a way that it will make it quite easy for user of the system to learn progressively through the system.
The design of the system is structured to aid the following learning methodologies:
Conscious or Direct Learning
This type of learning is more cognitive as it is rightly designed and channeled to a particular base. It is systematically structured to aid progressive acquiring of knowledge. This learning process is formalized and structured to follow a particular pattern or flow. “It is 'educative learning' rather than the accumulation of experience. To this extent there is a consciousness of learning - people are aware that the task they are engaged in entails learning” (SMITH, M. K., 1999)
Subconscious or relative learning
This mode of learning is not planned or arranged. Knowledge is acquired through performing some activities which inherently place some knowledge in the mind by virtue of the processes taken in the learning process. This gained knowledge is not directly sought for but comes as an unsolicited attachment relative to the process involved. The try and error method of solving a problem can also be said to fall into this category of learning system where a number of unstructured methods are adopted to arrive at a solution without initially conceptualizing the idea.
In designing this system, some educational design concepts were adopted. They included:
Introductory Approach
Using this method, the design of the lesson started with the very basic of Boolean logic so that whoever is using the system irrespective of his or her background will be able to grasp the fundamental of the system and such will form the basic foundation upon which subsequent lessons are based.
For every lesson created, the lesson is segmented into stages to handle the lesson from the least complicated to the more complex analyses.
Progressive Approach
Lessons are designed progressively. They are structured in such a way that, one lesson prepares the ground for the subsequent lessons.
In the lessons for the gate classes, the lesson starts with two inputs gates and progressed to 3 inputs and then four input gates. These are meant to make the lessons explicit and easy to understand.
Practical Approach
When lessons are made to be practicable, it allows the users to easily acquire the concept. In creating the lessons, they were made to be highly interactive. Users could see the results of actions performed spontaneously which makes the system quite very friendly and fun to use.
Visual Aid Approach
Logic gate and Circuit images are displayed for every lesson to demonstrate to the user the operation of the gate and how the input and output of every gate is arranged.
Graphs are also used to represent the operation of the various logic gates and circuits. Graphical representations are good visual aids in disseminating information, ideas and concepts.
Lesson Tutorials
Tutorials are exercises created to test the knowledge gained from lessons taken. Every lesson design is followed by a tutorial that is designed to test the knowledge of the user about the lesson taken. The tutorials are made to be interactive and the give feedback for every attempt made. The tutorials instruct the users to keep trying a particular question until the right answer is achieved.
Technical Design
The technical design for this project was categorized into two segments namely;
Interface design
Software design
Interface Design
The proposed system is meant to interact with the users via some of the computer tools. They include:
Keyboard: this will be useful in typing commands and inputting text or data entry required by the system to perform various tasks
Mouse: the mouse will be quite useful in dragging items, cursor movement, clicking icons and buttons, making selections in combo boxes, radio boxes and check boxes.
Monitor: this is the device for displaying information required by the user for the output of the system
Graphical User Interface (GUI)
A well designed and structured GUI is a veritable tool at aiding proper Human Computer Interaction (HCI). It is a more friendly way of HCI compared to command line interaction.
For this project, a GUI was designed to serve as an interface between the user and the computer.
Every lesson created is displayed on a GUI that has a number of GUI components.
The java swing library was used to develop the GUI. The library has a rich collection of methods and tools that were appropriated in the system to develop a well structured GUI with a good layout.
The GUI frame layout is made a border layout having the menu bar at the north, activation and operation buttons at the south, the lesson index view at the west and the lessons at the centre. All the sections are static except the centre which is dynamic to display various lessons as required. It was built on series of card panels which allow flipping and navigation through the lessons.
GUI Design Concepts
Given control to user: the GUI is meant to allow the user of the system to have control of its operation. User could flip through the interface at their convenient time without the system preempting. This design is based on this concept. All buttons and boxes have action listeners attached to them to handle click and selection actions by the user.
Checkboxes are used to select gate inputs, list is used to display lesson index. Text areas and fields are used to handle text input and display.
Reduced number of interface features: the interfaces are designed to have all the required features but in a very appropriate way to avoid congesting the interface with so many features which could make it looks complex and unattractive.
Professional Aesthetics: the interfaces are designed to look simple, appealing and attractive. Components on the interface are well structured and arranged to make the layout give a feel of professionalism.
Clarity: The system is designed to be concise and clear. Interface icons and components are easy to decipher and understand.
Navigation Speed (response time): Moving around the system is easy and fast. Response time is made low so as to ensure effectiveness and efficiency.
Technical design
This aspect covers the Unified Modelling Language (UML) and software design for the system.
Unified Modelling Language (UML) Design
UML makes the design and understanding of software system easier and more intuitive by providing techniques that was used to conceptually describe the classes required in the development of the system and the relationships that exist between those classes diagrammatically.
The UML diagram produced is used as a guide in design of the various classes using the required programming language. For this project Java is the main and only language for the system software design.
Identification of Classes
Several classes were identified and modeled to reflect the real operation of the system.
Each lesson is designed as a class and every class has the features to run the entire required topic for the lesson. The entire UML class diagram is represented in appendix……. Below is a sample of the modeled class diagrams. The diagram represent the AND class which perform all the required AND operations, the OR class which performs all the OR operations and the NOT class which performs the entire NOT operations. This class is a partial reflection of the modeled class as all the instance variables and methods cannot be represented in one whole class because they are quite many.
Fig 2.1: Class diagram for the AND, OR and NOT classes respectively
The figure below shows an extract from the entire UML diagram for the system design. The complete UML diagram is shown in appendix……..
Fig 2.2: An extract from the UML design showing the relationships among the classes shown.
Software Design
One of the main aims of this project is to design a software application using event driven programming that allows for human computer interaction.
To achieve this, an objected oriented programming language was considered for the development of the system.
Java was chosen as the programming language for the project because of the features and attributes it has gotten. It allows for creation of objects from designed classes and for the reuse of the classes as at when required. Java is quite portable and it supports the use of graphics.
Creating Classes
Each lesson was created on separate panel and a separate class taking full advantage of the highly reach Java API library. Every class has a constructor which helps to create the static lesson at run time. Each lesson interface is provided with a number of buttons that handles some dynamic operations on the panel. Some of the buttons include:
SHOW LOGIC OPERATION: This button when pressed, check for the statuses of all the input checkboxes of the gate and calculate the output. It then displays the entire result on a text area showing the combination of inputs and output. The following shows a snippet of the code that performs the above described operation for an AND gate with four inputs A, B, C and D and an output Y ;
public void LogicOperation3()
{
String output = "A B C D Y"+"\n"+
(a3.getText()) + " "+ (b3.getText())+" " +
(c3.getText())+" "+(d3.getText())+" "+ ((Integer.parseInt(a3.getText()))&(Integer.parseInt(b3.getText()))&(Integer.parseInt(c3.getText()))&(Integer.parseInt(d3.getText())));
displayLogic3.setText(output);
}
RESET TO DEFAULT: This button resets all the parameters of the lesson interface to their default values. The following shows sample codes for this operation;
public void reset3()
{
andGate3.clear();
aCheckbox3.setSelected(false);
bCheckbox3.setSelected(false);
cCheckbox3.setSelected(false);
dCheckbox3.setSelected(false);
displayLogic3.setText("");
outputAnd3.setText("?");
}
VIEW COMPLETE TRUTH TABLE: This button will generate the truth table for the logic gate displayed. The following shows a sample code for this operation for a four input AND gate;
public void truthOperation3()
{
andGate3.clear();
int a,b,c,d,y;
String output="";
String majorOutput="";
andGate3.addElement("A B C D Y");
for(a=0;a<=1;a++)
for(b=0;b<=1;b++)
for(c=0;c<=1;c++)
for(d=0;d<=1;d++) {
y= (a&b&c&d)&1;
output =output+ a + " " + b + " "+ c+" "+d+" "+y;
andGate3.addElement(output);
output="";
}
}
The entire codes for all the buttons on the GUI are attached as appendix to this report.
Event Handling
A number of classes were built to handle events when the user decides to perform certain operations. The following classes are meant to handle some specific operations:
ListHandler Class: This class is designed to handle the operation of the list that contains the lesson table of content. It listens and detects the index of the topic clicked in the list and display the corresponding page. The following is a snippet of the designed codes;
public void flipCategory()
{
int i = logic_list.getSelectedIndex();//returns the
index of item selected in the list
String topCategory = " ";//the default card
if(i == 0)
topCategory = "exp";
if(i == 1)
topCategory = "theAnd";
if(i == 2)
topCategory = "theOr";
((CardLayout)display_panel.getLayout()).show(display_panel,topCategory);
}
CheckBoxHandler Class: This class handles the mouse click events on the checkboxes that determines the input of the various gates. On sensing a click, the following codes perform the operation of changing the state of the checkbox and also calculating the corresponding output;
public void checkBoxEffectA3()
{
if(aCheckbox3.isSelected()==true)
{
a3.setText("1");
a3.setForeground(Color.red);
outputAnd3.setText(""+((Integer.parseInt(a3.getText()))&(Integer.parseInt(b3.getText()))&(Integer.parseInt(c3.getText()))&(Integer.parseInt(d3.getText()))));
}
else if(aCheckbox3.isSelected()==false)
{
a3.setText("0");
a3.setForeground(Color.black);
outputAnd3.setText(""+((Integer.parseInt(a3.getText()))&(Integer.parseInt(b3.getText()))&(Integer.parseInt(c3.getText()))&(Integer.parseInt(d3.getText()))));
}
}
CardHandler Class: This class handles the operation of the combo boxes responsible for flipping through the sub-lessons of the various designed lessons. It detects the index selected and then display the corresponding page.
Monday, 11 August 2008
Subscribe to:
Posts (Atom)
