Uploaded by steven hernandez

IM-AppDevEmerTools -2022

advertisement
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
QFO-8.3-03-01
Rev. 0
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
COLLEGE OF
INFORMATION TECHNOLOGY
Revision : __
Effective: __
Supersedes: __
Instructional Module
ITPC 17
APPLICATION DEVELOPMENT AND EMERGING TOOLS
Module Holder:
STEVEN M. HERNANDEZ
Control Number:
Prepared by:
Reviewed & Evaluated by:
STEVEN M. HERNANDEZ
Faculty Member
___________________
__________________
MARIA CRISTINA F. BELDAS, MBA, MIT
Dep’t Review Committee
Dean
Validated by:
Approved by:
Date: __________________
Date: _____________
Date: _________________
LEONILA VALLAR-LAGARDE, D.M., Ph.D.
Vice President for Academic Affairs
Date: _______________
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
REVISION HISTORY
NO.
1
DATE
February 2022
REVISION
1
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
I. OVERVIEW OF THE MODULE
A. SEC INSTITUTIONAL VISION
Surigao Education Center envisions to be a dynamic educational institution producing globally competitive professionals through quality
education.
B. SEC INSTITUTIONAL MISSION
Surigao Education is committed to provide an excellent quality education appropriate, relevant and responsive to the needs of our
stakeholders through a dynamic educational system anchored on the institutional core values with competent human resources
facilities, research and development.
C. SEC INSTITUTIONAL GOALS
1.
2.
3.
4.
5.
Strengthen the school’s internal controls, operational infrastructure and accountability.
Achieve a status of Professional Institute.
Sustainably strengthen the school’s medium and long-term financial position to obtain and maintain fiscal stability.
Establish a significant research culture and publication.
Serve Caraga Region by promoting a culture of community service and engagement.
D. SEC INSTITUTIONAL OUTCOMES:
A graduate of Surigao Education Center can
a. Render services to the community imbued with values of accountability, work ethics, excellence, honesty, cooperation and
social responsibility;
b. Implement practices on the preservation, restoration and improvement to the environment;
c. Create and communicate a vision that inspires others to act or achieve a desired goal;
d. Preserve and promote Filipino culture and love of country;
e. Demonstrate cultivation of knowledge and creative skills to excel in life’s chosen work.
PRORAM
VISION: The SEC-College of Information Technology aims for the graduate to acquire and develop knowledge, attitude and skills which
will enable them to be dynamic, globally competent, compassionate and committed Software Developers concerned with the application
of the most advance/latest breakthrough in Information Technology, in preparation for the higher education, industry certification and a
carrier in Information Technology, thus contributing to the improvement of an Information System that world benefit in our locally in
particular and the country in general.
VISION: The human being is the greatest resources in the nation’s aim to cope with the latest/advance trends in Information
Technology, specializing System Development. In order to respond to the needs of the times, Surigao Education Center offers
Computer Science and Information Technology courses.
To provide quality computer education to as many Filipinos as possible, making them equal with the best in the world.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
It is foreseen that graduates of this course will be readily accommodated in both public and private firms and institutions, with the
sufficient knowledge and skills in information technology.
We are dedicated in fulfilling this mission, thus setting the standard for all educational institutions.
OJBECTIVES: The Surigao Education Center – College of Information Technology produces a graduate who:
 Is accurate in receiving/ transmitting communication and/or information
 Applies skill responsibility as computer technocrats.
 Manifest openness and flexibility in adapting to technologically advancements.
 Is competent innovator in response to the technological needs/demands of the times.
 Contributes to the development of application of computer technology in business educations arts, and other field in
society.
E. PROGRAM OUTCOMES:
 PO1: Develop specifications for a software development effort that precisely articulates the functional requirements,
expected execution paths, and the explicit use of cuttingedge or emerging technologies, which includes hardware
devices and software library APIs (Philippines Qualification Framework (PQF) (Graduate outcomes: IT03, IT04)
 PO2: Select and use a defined coding, documentation writing, and licensing standards in a sufficiently complex
software project where coding idioms and mechanisms forimplementing designs to achieve desired properties such
as reliability, efficiency, and robustness are practiced with respect to legal and ethical considerations. (Philippines
Qualification Framework (PQF) (Graduate outcomes: IT01, IT02))
 PO3: Undertake, as part of a team activity, an inspection of the source code and unit testing of the functional units of
a sufficiently complex software project. (Philippines Qualification Framework (PQF) (Graduate outcomes: IT06)
F. COURSE OUTCOMES:
CO1: Distinguish a proper deployment plan based on real-life scenarios.
CO2: Use the correct usability testing method for a software development and Describe the requirements analysis process
and techniques
CO2: Use the correct usability testing method for a software development
G. Course Map
Course Code
Course Title
ITPC 17
APPLICATION
DEVELOPMENT
AND
EMERGING
TECHNOLOGIES
Program Outcomes

PO1: Develop specifications for
a software development effort
that precisely articulates the
functional
requirements,
CO1
CO2
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines


expected execution paths, and
the explicit use of cuttingedge or
emerging technologies, which
includes hardware devices and
software
library
APIs
(Philippines
Qualification
Framework (PQF) (Graduate
outcomes: IT03, IT04)
PO2: Select and use a defined
coding, documentation writing,
and licensing standards in a
sufficiently complex software
project where coding idioms and
mechanisms
forimplementing
designs to achieve desired
properties such as reliability,
efficiency, and robustness are
practiced with respect to legal
and
ethical
considerations.
(Philippines
Qualification
Framework (PQF) (Graduate
outcomes: IT01, IT02))
PO3: Undertake, as part of a
team activity, an inspection of
the source code and unit testing
of the functional units of a
sufficiently complex software
project. (Philippines Qualification
Framework (PQF) (Graduate
outcomes: IT06)
Legend: I – Introduced Concept/Principle
P – Practiced with Supervision
D – Demonstrated across different clinical setting with minimal supervision
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
H. Course Description:
Application Development and Emerging Tools, this is a 3 unit subject, the course Application Development and
Emerging Technologies is the development of applications using web, mobile, and emerging technologies with
emphasis on requirements management, interface design, usability, testing, and deployment, including ethical and
legal considerations.
I.
Pre-requisite: ITPC 9
J. Co-requisite: none
J.
Course Requirements:
 Provide a conceptual foundation of object-oriented programming and illustrate each concept with a diagramic
notation using UML.
 GUI and event-driven programming using Swing based GUI components that include JButton, JLabel, ImageIcon,
JTextField and JTextArea.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
II. Course Outline
Periodic Module
Schedule Number
1
Prelim
2
Midterm
3
4
5
Pre-final
6
7
Final
8
Topics
Classes of Software
Understanding the Requirements Gathering in
Software Development
EXAM
Software Development Life Cycle
Research design and testing
EXAM
BASIC ANDROID PROGRAMMING
ANDROID PROJECT MIGRATION FROM
ECLIPSE TO ANDROID
STUDIO
EXAM
INTRODUCTION
TO
ARTIFICIAL
INTELLIGENCE
POPULAR
SEARCH
ALGORITHMS
(ARTIFICIAL INTELLIGENCE)
EXAM
TOTAL
Week Number
1-4.5
5-9.5
10-13.5
Number of Hours
Lecture
Laboratory
4.5
6.75
4.5
6.75
4.5
4.5
6.75
6.75
4.5
6.75
4.5
6.75
4.5
6.75
4.5
6.75
36
54
14-18
18 WEEKS
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
III. LEARNING PLAN
A. Week No. 1-4.5
hrs lab
COURSE
INTENDED
OUTCOM LEARNING
ES
OUTCOMES
 Learn on
how
to
interpret a
data
 Learn
different
ways on
how
to
manage a
data.
 Describe
the
requireme
nts
analysis
process
and
technique
s
 Use the
correct
usability
testing
method
for
a
software
developm
Module No. 1
LEARNING
TASKS/ACTIVI
TIES
 Written Quiz
 Essay
 Enrichment
Activity
Classes of Software
ASSESSMENT TASKS
 Explain what is software
 Importance Software Paradigms
 SDLC Model
Time Allocation: 4.5 hrs Lec/6.75
REFERENCES
 Gallaugher, J. (2012).
Understanding Software: A
Primer For Managers.
Information Systems: A
Manager's Guide to
Harnessing Technology (1.4
ed.). Irvington, NY, United
States: Flatworld Knowledge,
Inc.
 Leau, Y. B., Loo, W. K.,
Tham, W. Y., & Tan, S. F.
(2012). Software
Development Life Cycle
AGILE vs Traditional
Approaches. In 2012
International Conference on
Information and Network
Technology (ICINT 2012)
IPCSIT (Vol. 37).
 McMurtrey, M. (2013). A Case
Study of the Application of the
Systems Development Life
Cycle (SDLC) in 21st Century
Health Care: Something Old,
Something New?. Journal of
the Southern Association for
Information Systems,1(1).
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
ent
 Distinguis
h
a
proper
deployme
nt
plan
based on
real-life
scenarios
.
B. Learning Tasks/Activities (Lesson Proper)
LESSON 1. WHAT IS A SOFTWARE?
Lesson Objectives:
At the end of this lesson, you will be able to:
1. Define what is a software and its classes
2. Identify the basic principles of a software
3. Identify the software evolution and laws
Getting Started:
 Website: Systems
Development Life Cycle.
(2013). Wikipedia. Retrieved
on July 12, 2013 from
http://en.wikipedia.org/wiki/Sy
stems_development_life-cycle
 Website: The Systems
Development Life Cycle
Basics. (n.d.). McGraw Hill
Connect. Retrieved on July
12, 2013 from
http://highered.mcgrawhill.com/sites/dl/free/00733767
36/596593/AppendixD.pdf
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Software is capable of performing many tasks, as
opposed to hardware which can only perform
mechanical tasks that they are designed for.
Software provides the means for accomplishing
many different tasks with the same basic hardware
Software is more than just a program code. A program is an executable code, which serves some computational
purpose. Software is considered to be collection of executable programming code, associated libraries and
documentations. Software, when made for a specific requirement is called software product.
Classes of Software
•
System software: Helps run the computer hardware and computer system itself. System software includes
operating systems, device drivers, diagnostic tools and more. System software is almost always pre-installed on your
computer.
•
Application software: Allows users to accomplish one or more tasks. It includes word processing, web browsing
and almost any other task for which you might install software. (Some application software is pre- installed on most
computer systems.)
•
Programming software is a set of tools to aid developers in writing programs. The various tools available are
compilers, linkers, debuggers, interpreters and text editors.
Basic Principles
1. Software, commonly known as programs or apps, consists of all the instructions that tell the hardware how to perform
a task.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
2. These instructions come from a software developer in the form that will be accepted by
the platform (operating
system + CPU) that they are based on.
3. For example, a program that is designed for the Windows operating system will only work for that specific operating
system. Compatibility of software will vary as the design of the software and the operating system differ. Software that is
designed for Windows XP may experience a compatibility issue when running under Windows 2000 or NT.
4. Software, in its most general sense, is a set of instructions or programs instructing a computer to do specific tasks.
Software is a generic term used to describe computer programs. Scripts, applications, programs and a set of
instructions are all terms often used to describe software.
Software Evolution
The process of developing a software product using software engineering principles and methods is referred to as
software evolution. This includes the initial development of software and its maintenance and updates, till desired
software product is developed, which satisfies the expected requirements.
Evolution starts from the requirement gathering process. After which developers create a prototype of the intended software
and show it to the users to get their feedback at the early stage of software product development. The users suggest
changes, on which several consecutive updates and maintenance keep on changing too. This process changes to the
original software, till the desired software is accomplished. Even after the user has desired software in hand, the advancing
technology and the changing requirements force the software product to change accordingly. Re-creating software from
scratch and to go one-on-one with requirement is not feasible. The only feasible and economical solution is to update the
existing software so that it matches the latest requirements.
Laws in Software Evolution
•
Eight laws for software evolution:
•
Continuing change - A software system must continue to adapt to the real world changes, else it becomes
progressively less useful.
•
Increasing complexity - A software system evolves, its complexity tends to increase unless work is
done to maintain or reduce it.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
•
Conservation of familiarity - The familiarity with the software or the knowledge about how it was
developed, why was it developed in that particular manner etc. must be retained at any cost, to implement
the changes in the system.
•
Continuing growth- In order for a system intended to resolve some business problem, its size of
implementing the changes grows according to the lifestyle changes of the business.
Reducing quality - A software system declines in quality unless rigorously maintained and adapted to
a changing operational environment.
•
•
Feedback systems- The software systems constitute multi-loop, multi-level feedback systems and
must be treated as such to be successfully modified or improved.
•
Self-regulation - a system evolution processes are self-regulating with the distribution of product and
process measures close to normal.
•
Organizational stability - The average effective global activity rate in an evolving a system is
invariant over the lifetime of the product.
Reducing quality - A software system declines in quality unless rigorously maintained and adapted to
a changing operational environment.
•
•
Feedback systems- The software systems constitute multi-loop, multi-level feedback systems and
must be treated as such to be successfully modified or improved.
•
Self-regulation - a system evolution processes are self-regulating with the distribution of product and
process measures close to normal.
•
Organizational stability - The average effective global activity rate in an evolving a system is
invariant over the lifetime of the product.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
LESSON 2. SOFTWARE PARADIGMS
Lesson Objectives:
At the end of this lesson, you will be able to:
1. Define the software paradigms
2. Identify the characteristics of a good software
3. Identify examples and use case scenarios
Software Development Paradigm
• Software paradigms refer to the methods and steps, which are taken while designing the
software. There are many methods proposed and are in work today, but we need to see
where in the software engineering these paradigms stand.
• These can be combined into various categories, though each of them is contained in
one another
• Programming paradigm is a subset of Software design paradigm which is further a
subset of Software development paradigm.
•
This Paradigm is known as software engineering paradigms where all the engineering
concepts pertaining to the development of software are applied. It includes various
researches and requirement gathering which helps the software product to build. It
consists of the following
•
Requirement gathering
•
Software design
•
Programming
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Software Design Paradigm
•
This paradigm is a part of Software Development and includes the following
•
Design
•
Maintenance
•
Programming
Programming Paradigm
•
This paradigm is related closely to programming aspect of software development. This includes –
•
Coding
•
Testing
•
Integration
Characteristics of good software
A software product can be judged by what it offers and how well it can be used. This software must satisfy on the
following grounds:
•
Operational
•
Transitional
•
Maintenance
Operational
•
This tells us how well software works in operations. It can be measured on:
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
•
Budget - cost
•
Usability - the degree of ease with which products such as software and Web applications can be used
to achieve required goals effectively and efficiently.
•
Efficiency - is defined as a level of performance that uses the lowest amount of inputs to create the
greatest amount of outputs.
Correctness - adherence to the specifications that determine
how users can interact with the software and how
the software should behave when it is used correctly.
•
•
Functionality - is the ability of the system to do the work for
which it was intended.
•
Dependability - is the ability to provide services that can
defensibly be trusted within a time-period.
•
Security – secured system
•
Safety
Transitional
•
This aspect is important when the software is moved from one platform to another:
•
Portability - he usability of the same software in different environments
•
Interoperability - the ability of computer systems or software to exchange and make use of information
•
Reusability- the use of existing assets in some form within the software product development process;
these assets are products and by-products of the software development life cycle and include code,
software components, test suites, designs and documentation.
•
Adaptability - an open system that is able to fit its behavior according to changes in its environment or in
parts of the system itself
Maintenance
This aspect briefs about how well a software has the capabilities to maintain itself in the ever- changing environment:
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
•
Modularity the extent to which
a software/Web application may be divided into smaller modules.
•
Maintainability - is defined as the degree to which an application
is understood, repaired, or enhanced.
•
Flexibility - it normally refers to the ability for the solution to adapt to possible or future changes in its
requirements.
•
Scalability - is the ability of a program to scale
LESSON3. SOFTWARE DEVELOPMENT LIFE CYCLE
Lesson Objectives:
At the end of this lesson, you will be able to:
1.
2.
3.
4.
Define what is a Software Development Life Cycle or SDLC
Define the steps and procedures in SDLC
Provide examples for each steps and procedures in SDLC
Define the SDL Models
Software Development Life Cycle
•
Software Development Life Cycle, SDLC for short, is a well-defined,
structured sequence of stages in software engineering to develop the
intended software product.
Steps in SDLC
•
•
Communication – initiate the request
Requirement Gathering – bringing out the information on what the project requirement is
• Feasibility Study - he team analyzes if a software can be made to fulfill all requirements of the user and if there is
any possibility of software being no more useful.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
• System Analysis - decide a roadmap of their plan and try to bring up the best software model suitable for the
project. Understanding the software limitations and changes to be done
• Software design - The inputs from users and information gathered in requirement gathering phase are the inputs of
this step. Output will be the logical design and the physical design
• Coding – programming phase
• Testing – End user testing
• Integration – integration with other entity
• Implementation - installing the software on user machines
• Operation and Maintenance – maintaining the code, the systems for patch updates
• Disposition – retirement; legacy system
SDLC Model
Waterfall Model
Waterfall model is the simplest model of software development paradigm. It says the all the phases of SDLC will function
one after another in linear manner. That is, when the first phase is finished then only the second phase will start and so on.
Iterative Model
This model leads the software development process in iterations. It projects the process of development in cyclic manner
repeating every step after every cycle of SDLC process
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Spiral Model
Spiral model is a combination of both, iterative model and one of the SDLC
model. It can be seen as if you choose one SDLC model and combine it with
cyclic process (iterative model).
System Implementation Implementation
Implementation refers to activities that occur before the system is turned over to its users. Its purpose is to:





build a properly working system install it in the organization
replace the old systems and work methods
finalize system and user documentation
train users
prepare support systems to assist users
In addition, implementation involves project closedown, including personnel evaluation, staff reassignment, project
success assessment, and all resources turnover on those who will support and maintain the system. Implementation is
considered to be expensive because there are a lot people involved in the process. It is also time-consuming since all the
work must be completed. The discussion on implementation covers six major activities and these are coding, testing,
installation, documentation, user training, and support.
Coding
Coding is the process where the physical design specifications developed by the analysis team are converted into
computer codes by the programming team. This can be an involved and intensive activity that depends on the size and
complexity of the system. No matter what development methodology is used, once the coding has begun, the testing
process can begin and proceed in parallel. With each program module produced, it can be tested individually, then as part
of a larger program, and then as part of a larger system. These different types of testing will be discussed in the next
subsections.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Testing
Even though testing is done during implementation, the planning for testing should start earlier in the project. Planning
covers determining what needs to be tested and collecting test data. Testing is the process of examining a product to
ascertain what defects it contains. To conduct a test, programmers should have already built the software and have in
hand well-defined standards for what composes a defect. The product can be tested through reviewing their construction
and composition or through exercising their function and examining the results. Software testing usually begins early in
the systems development life cycle, although many of the actual testing activities are carried out during implementation.
Types of Testing
Components can be tested individually or in groups, or the entire system can be tested as a whole. There are three testing
types and these are:
1. Unit testing
2. Integration testing
3. System testing
Each of this type correlated to a specific phase of the SDLC. Unit Testing Sometimes called module testing, unit testing is
the process of testing individual code modules before they are integrated with other modules. The objective of unit testing
is to identify and fix as many errors as possible before modules are combined into larger software units (such as
programs, classes, and subsystems). Unit testing is often automated but it can also be done manually. Unit testing can be
tedious and time consuming. It requires patience and meticulousness on the part of the development team. Unit testing
should be done with an awareness that it may not be possible to test a module for every input scenario that will occur
when the program is run in a real-world environment. Once all of the modules in a program have been found to be
working in the most efficient and error-free manner possible, larger components of the program can be assessed by
means of integration testing.
Integration Testing
Combining modules and testing them is called integration testing. The use of this test is to identify errors that were not or
could not be detected by unit testing individual modules. Such errors could result from several problems, including:
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines




Interface incompatibility. An example is a caller module that passes a variable of the wrong data type to a
subordinate module.
Parameter values. A module is passed or returns a value that was unexpected (such as negative number for a
price).
Run-time exceptions. A module generates an error such as “out of memory” or “file already in use” due to
conflicting resource needs.
Unexpected state interactions. The conditions of two or more modules interact to cause complex failures (such
as an order class method that operates correctly for all possible customer object conditions except one).
System Testing
In system testing, instead of integrating modules into programs for testing, the programs are integrated into systems. Not
only do individual modules and programs are tested several times in system testing, but also interfaces between modules
and programs. Usually, system testing is performed first by developers or test personnel to make sure that the system does
not fail and meets the developers’ understanding of user requirements. If a system is developed in several iterations,
system testing is performed mostly at the end of each iteration to identify significant issues such as performance problems
that will need to be dealt with in the next iteration.
Acceptance Testing
After the system tests are complete, the system is now ready for acceptance testing. This is testing the system in the
environment where it will eventually be used. Acceptance means that users normally sign off on the system and “accept” it
once they are satisfied with it. In other words, acceptance testing is a way for users to verify if the system meets their
requirements. Usually, acceptance testing is the last round of testing before the system is handed over to its users.
There are two types of acceptance testing and these are:
1. Alpha testing – user testing of a completed information system using simulated data
2. Beta testing – user testing of a completed information system using real data in the real user environment
In alpha testing, the whole system is implemented in a test environment to find out whether the system is openly
destructive to itself or to the rest of the environment. There are several types of tests done during alpha testing and these
are as follows:
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines




Recovery testing – forces the software (or environment) to fail in order to verify that recovery is properly
performed
Security testing – verifies that protection mechanisms built into the system will protect it from improper penetration
Stress testing – tries to break the system
Performance testing – determines how the system performs in the range of possible environments in which it may
be used; often the goal is to have the system perform with similar response time and other performance measures
in each environment
The purpose of beta testing is to ascertain whether the software, documentation, technical support, and training activities
work as planned. Beta testing can be considered as a preparation of the installation phase. Problems not covered in alpha
and beta testing in any of these areas should be fixed before users can accept the system.
Installation
After the new system has been developed and tested, it must be installed and placed into operation. Installation is the
process of moving from the current information system to the new one. There are many constraints when installing a new
system and making it operational. These include cost, customer relations, employee relations, logistical complexity, and
overall exposure to risk. Some other important issues to consider when planning installation are as follows:




Incurring costs operating both systems in parallel
Detecting and correcting errors in the new system
Potentially disrupting the company and its IS operations
Training personnel and familiarizing customers with new procedures
Approaches to Installation
There are different approaches to installation and the most commonly used are:
1. Direct installation
2. Parallel installation
3. Phased installation
Details of these approaches are discussed in the succeeding subsections.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Direct Installation
In direct installation, the old system is turned off and the new system is turned on. The figure below shows the timeline for
direct installation.
In direct installation, the users use the new system. Whatever errors found from the new system will have a direct impact
on the users and how they do their jobs. If the new system fails, considerable delay may occur until the old system can
operate again and business transactions are re-entered to make the database updated.
The main advantage of direct installation is its simplicity. There are fewer logistical issues to manage fewer resources
required because the old and new systems are not operated in parallel. However, the drawback of direct installation is its
risk. There is no backup when the new system fails because older systems are not operated in parallel. Moreover, direct
installation requires a complete installation of the whole system.
In general, direct installation is used in one or both of the following conditions:


The new system is not replacing an older system (automated or manual).
Downtime of days or weeks can be tolerated
If neither of the condition applies, then parallel or phased installation is used to minimize the risk of system unavailability.
Parallel Installation
In parallel installation, the old system continues to operate along with the new system until the users and management are
satisfied with the performance of the new system and has been thoroughly tested and determined to be error-free and
ready to operate independently. All of the work done by the old system is performed in parallel by the new system. The
time allotted for parallel operation is often determined ahead and limited to minimize the cost of dual operation. The figure
below illustrates the timeline for parallel installation.
An advantage of parallel installation is its low risk of system failure and the negative consequences that may result from that
failure. If both systems are operated completely, then the old system serves as a backup for the new system. Any failure
in the new system can be mitigated by relying on the old system.
A parallel installation can be very expensive. Since two systems are running, it addition, parallel installation can be
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
confusing to users because they are dealing with both systems.
A parallel approach may not be possible or feasible if the users of the system (such as customers) cannot tolerate
redundant effort or if the size of the system is large.
Phased Installation
In Phased Installation, the new system is installed and brought into operation in a series of steps or phases.
Components or functions are added to the operational system on each phase. The system is tested in each phase to make
sure that it is ready for the next phase. Phased installation can be combined with parallel installation, especially when the
new system will take over the operation of multiple existing systems.
The main benefit of phased installation is that it reduced risk because failure of a single phase is less problematic than
failure of an entire system. However, its drawback is that it increased complexity. Dividing the installation into phases
makes more activities and milestones, hence making the whole process more complex. Though each individual phase
includes a smaller and more manageable set of activities. Phased installation is useful mainly when a system is large,
complex, and composed of relatively independent subsystems. If these subsystems are not substantially independent,
then it is hard or impossible to define separate installation phases.
C. Suggested Readings/Videos
 Alistai Sutcliffe, "Scenario-based requirements analysis." Requirements Engineering Journal, London, UK, 1998.
D. Assessment Tasks
Exercises
ENRICHMENT ACTIVITY
1. Good software can be characterized on three grounds: one is operability which tells us how well software works in
operations. Choose three factors where it can be measured and discuss it in your own words.
2. Software paradigms are commonly used to develop large software applications. Give an example where it can be
applied and explain its use in that field.
3. What is the importance of continuous evolution in software? Provide an example by citing well-known applications
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
which have obtained transformation over the years.
MODULE #1: ASSESSMENT
1.
2.
3.
4.
In your own understanding, what is a software? How is it related to hardware and people ware?
What are the software paradigms and how do they affect software development?
Which phase of SDLC is the most critical part? Justify you answer by citing an example.
Why is it important for any organization to integrate training and support in their computing infrastructure
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Week No. 1-4.5 Module No. 2 Understanding the Requirements
4.5hrs lec / 6.75 hrs lab
COURSE
INTENDED LEARNING
LEARNING
OUTCOMES
OUTCOMES
TASKS/ACTIVITIES
 Learn on how to
Introductory Activity:
interpret a data
 Learn different ways  understanding the
on how to manage a
principle
of
data.
requirements
 Describe the
gathering,
requirements analysis
specifications and
process and
data
gathering
techniques
guidelines
 Use the correct
usability testing
method for a software
development
 Distinguish a proper
deployment plan
based on real-life
scenarios.
Gathering in Software DevelopmentTime Allocation:
ASSESSMENT TASKS
REFERENCES
Alistai
Sutcliffe,
Give IT firm and relate how "Scenario-based
these principles affect the requirements
business operations
analysis."
Requirements
Engineering Journal,
London, UK, 1998.
Learning Tasks/Activities (Lesson Proper)
LESSON 1. REQUIREMENTS GATHERING
Lesson Objectives:
1. Understand the principle of requirements gathering and specifications
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
2. How and what requirements to gather.
3. Define the techniques in requirements gathering
4. Identify the importance of requirements gathering
What are requirements and its specifications?
•
A requirement is a statement about an intended product that specifies what it should do or how it should perform.
•
Goal: To make as specific, unambiguous, and clear as possible.
•
Functional Specifications: What the system should do
•
Non-Functional Specifications: what constraints there are on the system its development - (For example that a
word processor runs on different platforms)
What requirements should be gathered?
•
Functional: What the product should do.
•
Data requirements: Capture the type, volatility, size/amount, persistence, accuracy and the amounts of the required
data.
•
Environmental requirements:
•
a) context of use
•
b) Social environment (eg. Collaboration and coordination)
•
c) how good is user support likely to be d) what technologies will it run on
•
User Requirements: Capture the characteristics of the intended user group.
•
Usability Requirement: Usability goals associated measures for a particular product.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Data Gathering Techniques
•
Questionnaires: Series of questions designed to elicit specific information from us.
The questions may require different kinds of answers: some require a simple Yes/No, others ask us to choose from a set of
pre-supplied answers.
•
Interviews: Interviews involve asking someone a set of questions.
•
•
Interviews:
Often interviews are face-to-face
•
Forum for talking to people
•
Structured, unstructured or semi-structured
•
Props, e.g. sample scenarios of use, prototypes, can be used in interviews
•
Good for exploring issues
•
But are time consuming and may be infeasible to visit everyone
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
•
Focus groups and workshops
•
•
•
Interviews tend to be one on one, and elicit only one person’s perspective. It can be very revealing to
get a group of stakeholders together to discuss issues and requirements.
Naturalistic Observation
•
It can be very difficult for humans to explain what they do or to even describe accurately how
they achieve a task.
•
Spend time with stakeholders in their day-to-day tasks, observing work as it happens
•
Gain insights into stakeholders’ tasks
•
Good for understanding the nature and context of the tasks
•
But it requires time and commitment from a member of the design team, and it can result in a huge
amount of data
•
Ethnography is one form: entire class devoted to this.
Studying documentation:
•
Procedures and rules are often written down in a manual and these are a good source of data
about the steps involved in an activity and any regulations governing a task.
Requirements Gathering
Requirements Gathering is a fundamental part of any software development project. It is the process of generating a list
of requirements (functional, system, technical, etc.) from all the stakeholders (customers, users, vendors, IT staff) that
will be used as the basis for the formal definition of what the project is.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
The importance of Requirements Gathering
•
The problem with the business customers is that the latter tends to expect software teams to deliver a solution
based on unspoken, incomplete or unknown requirements
•
The problem with software teams is that they tend to assume that business customers will communicate exactly
what they want as succinctly as possible.
•
Therefore, the requirements need to be formally captured in one document that can be used as a reference during
software development.
•
Good gathering, processing and management of requirements is important as it sets clear targets for everyone to
aim for. It can be a lot of hard work, but it need not be a daunting task if you can keep some key points in mind.
•
Remember it’s all about the user. Consider always the user inputs. Find out how actual users complete their tasks
and exactly how they get things done – and how they want to get things done. What do they need to do? How
efficiently can we make that happen? And what sorts of flexibility might be required?
The User comes first
•
The requirements should detail how a user would accomplish what they want using the software being developed.
Awareness of any technological preferences and existing system integration is also fundamental, as it can have a
huge impact on the development path and subsequently impact on performance and user task efficiency.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
LESSON2. DATA GATHERING GUIDELINES
Lesson Objectives:
1.
2.
3.
4.
Understand the principle of data gathering guidelines
Understand the requirements gathering framework
Define the techniques in requirements gathering
Identify the requirements analysis techniques
Data Gathering Guidelines
Focus on identifying the stakeholders
Involve all the stakeholder groups
Need more than in person from stakeholder group(s)
Use a combination of data gathering techniques
For example: use observation to understand the context, interviews to target specific user groups, questionnaires to
reach a wider population, and focus groups to build a consensus view
Support the data-gathering sessions with suitable props, such as task descriptions and prototypes if available.
Run a pilot session if possible, to ensure that your data-gathering session is likely to go asplanned
In an ideal world, you would understand what you are looking for and what kinds of analysis you want to do, and design
the data-capture exercise to collect the data you want. However, data gathering is expensive and often a tightly
constrained
resource
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 1 Requirements Gathering Framework
How to interpret the data?
•
The next question would be – how to interpret the data?
•
What structure and record description of requirement will be used?
•
When to start the interpretation?
•
We can use analysis models in object-oriented systems by using a
•
Use cases diagrams: consists of actors and user cases, discussed later
•
Class diagrams
What is the Requirements Analysis?
Requirements Analysis is the process of defining the expectations of the users for an application that is to be built or
modified. Requirements analysis involves all the tasks that are conducted to identify the needs of different stakeholders.
Therefore, requirements analysis means to analyze, document, validate and manage software or system requirements.
High-quality requirements are documented, actionable, measurable, testable, traceable, helps to identify business
opportunities, and are defined to a facilitate system design
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Requirements Analysis Techniques
•
Business process modeling notation (BPMN)
•
•
This technique is similar to creating process flowcharts, although BPMN has its own symbols and elements.
Business process modeling and notation is used to create graphs for the business process. These graphs
simplify understanding the business process. BPMN is widely popular as a process improvement
methodology.
Flowchart technique
A flowchart depicts the sequential flow and control logic of a set of activities that are related. Flowcharts are in
different formats such as linear, cross-functional, and top-down. The flowchart can represent system
interactions, data flows, etc. Flow charts are easy to understand and can be used by both the technical and nontechnical team members. Flowchart technique helps in showcasing the critical attributes of a process.
Data flow diagram
•
•
This technique is used to visually represent systems and processes that are complex and difficult to describe
in text. Data
flow diagrams represent the flow of information through a process or a system. It also includes the data
inputs and outputs, data stores, and the various subprocess through which the data moves. DFD describes
various entities and their relationships with the help of standardized notations and symbols. By visualizing
all the elements of the system it is easier to identify any shortcomings. These shortcomings are then
eliminated in a bid to create a robust solution.
Role Activity Diagrams (RAD)
•
Role-activity diagram (RAD) is a role-oriented process model that represents
role- activity diagrams. Role
activity diagrams are a high-level view that captures the dynamics and role structure of an organization.
Roles are used to grouping together activities into units of responsibilities. Activities are the basic parts of a
role. An activity may be either carried out in isolation or it may require coordination with other activities
within the role.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Gantt Charts
Gant charts used in project planning as they provide a visual representation of tasks that are scheduled along with the
timelines. The Gant charts help to know what is scheduled to be completed by which date. The start and end dates of
all the tasks in the project can be seen in a single view.
Gap Analysis
Gap analysis is a technique which helps to analyze the gaps in performance of a software application to
determine whether the business requirements are met or not. It also involves the steps that are to be taken to
ensure that all the business requirements are met successfully. Gap denotes the difference between the
present state and the target state. Gap analysis is also known need analysis, need assessment or need-gap
analysis.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Enrichment Activity
Name:
After understanding the principle of requirements gathering, specifications and data gathering guidelines, explain how
these does affect the business requirements in software development. Give an example of an existing organization or IT
firm and relate how these principles affect the business operations.
Module #2: Assessment
Name:
1. Why do we need to identify and establish the requirements in software development?
2. What are the kinds of specifications needed in this requirement gathering? Give example.
3. What kind of requirements should be gathered?
4. How will you differentiate each data gathering techniques?
5. How are we going to interpret the gathered
Week No. 5-9.5
Module No. 3 SOFTWARE DEVELOPMENT LIFE CYCLE Time Allocation: 4.5hrs lec
/ 6.75 hrs lab
COURSE
INTENDED LEARNING
LEARNING
ASSESSMENT TASKS
REFERENCES
OUTCOMES
OUTCOMES
TASKS/ACTIVITIES
 Define what is a Software
Introductory Activity:
https://www.scribd.co
Development Life Cycle or SDLC
m/document
 Define the steps and procedures
 Define the stages of
/513459428/PROG30
in SDLC
SDLC
1-Application Provide examples for each steps
Development-andand procedures in SDLC
Emerging-
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
 Define the SDL Models
Technologies
Learning Tasks/Activities (Lesson Proper)
Software Development Life Cycle
•
Software Development Life Cycle, SDLC for short, is a well-defined, structured sequence of stages in software engineering to develop
the intended software product.
Steps in SDLC
•
Communication – initiate the request
• Requirement Gathering – bringing out the information on what the project requirement
is
• Feasibility Study - he team analyzes if a software can be made to fulfill all requirements
of the user and ifthere is any possibility of software being no more useful.
• System Analysis - decide a roadmap of their plan and try to bring up the best software
model suitable for the project. Understanding the software limitations and changes to be
done
• Software design - The inputs from users and information gathered in requirement
gathering phase
are the inputs of this step. Output will be the logical design and the physical design
•
Coding – programming phase
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
•
Testing – End user testing
•
Integration – integration with other entity
•
Implementation - installing the software on user machines
•
Operation and Maintenance – maintaining the code, the systems for patch updates
•
Disposition – retirement; legacy system
SDLC Model
Waterfall Model
Waterfall model is the simplest model of software development paradigm. It says the all the phases of SDLC will function one
after another in linear manner. That is, when the first phase is finished thenonly the second phase will start and so on.
This model leads the software development process in iterations. It projects the process of development in cyclic manner repeating
every step after every cycle ofSDLC process.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Iterative Model
Spiral Model
Spiral model is a combination of both, iterative model and one of the SDLC model. It
can be seen as if you choose one SDLC model and combine it with cyclic process
(iterative model).
System Implementation
Implementation refers to activities that occur before the system is turned over to its users.Its purpose is to:





build a properly working system install it in the organization
replace the old systems and work methods
finalize system and user documentation
train users
prepare support systems to assist users
In addition, implementation involves project closedown, including personnel evaluation, staff reassignment, project success
assessment, and all resources turnover on those who will support and maintain the system. Implementation is considered to be
expensive because there are a lot people involved in the process. It is also time-consuming since all the work must be completed. The
discussion on implementation covers six major activities and these are coding, testing, installation, documentation, user training, and
support.
Coding
Coding is the process where the physical design specifications developed by the analysis team areconverted into computer codes by the
programming team. This can be an involved and intensive activity that depends on the size and complexity of the system. No matter
what development methodology is used, once the coding has begun, the testing process can begin and proceed in parallel. With each
program module produced, it can be tested individually, then as part of a larger program, and then as part of a larger system. These
different types of testing will be discussed in the next subsections.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Testing
Even though testing is done during implementation, the planning for testing should start earlier in the project. Planning covers
determining what needs to be tested and collecting test data. Testing is the process of examining a product to ascertain what defects
it contains. To conduct a test, programmers should have already built the software and have in hand well-defined standards for what
composes a defect. The product can be tested through reviewing their construction and composition or through exercising their
function and examining the results. Software testing usually begins early in the systems development life cycle, although many of the
actual testing activities are carried out during implementation.
Types of Testing
Components can be tested individually or in groups, or the entire system can be tested as a whole. There are three testing types and
these are:
1. Unit testing
2. Integration testing
3. System testing
Each of this type correlated to a specific phase of the SDLC. Unit Testing Sometimes called module testing, unit testing is the
process of testing individual code modules before they are integrated with other modules. The objective of unit testing is to identify and
fix as many errors as possible before modules are combined into larger software units (such as programs, classes, and subsystems). Unit
testing is often automated but it can also be done manually. Unit testing can be tedious and time consuming. It requires patience and
meticulousness on the part of the development team. Unit testing should be done with an awareness that it may not be possible to test a
module for every input scenario that will occur when the program is run in a real-world environment. Once all of the modules in a
program have been found to be working in the most efficient and error-free manner possible, larger components of the program can be
assessed by means of integration testing.
Integration Testing
Combining modules and testing them is called integration testing. The use of this test is to identify errors that were not or could not be
detected by unit testing individual modules. Such errors couldresult from several problems, including:



Interface incompatibility. An example is a caller module that passes a variable of the wrong data type to a subordinate
module.
Parameter values. A module is passed or returns a value that was unexpected (such as negative number for a price).
Run-time exceptions. A module generates an error such as “out of memory” or “file already in use” due to conflicting
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines

resource needs.
Unexpected state interactions. The conditions of two or more modules interact to cause complex failures (such as an order
class method that operates correctly for all possible customer object conditions except one).
System Testing
In system testing, instead of integrating modules into programs for testing, the programs are integrated into systems. Not only do
individual modules and programs are tested several times in system testing, but also interfaces between modules and programs.
Usually, system testing is performed first by developers or test personnel to make sure that the system does not fail and meets the
developers’ understanding of user requirements. If a system is developed in several iterations,system testing is performed mostly at the
end of each iteration to identify significant issues such as performance problems that will need to be dealt with in the next iteration.
Acceptance Testing
After the system tests are complete, the system is now ready for acceptance testing. This is testingthe system in the environment where it
will eventually be used. Acceptance means that users normally sign off on the system and “accept” it once they are satisfied with it. In
other words, acceptance testing is a way for users to verify if the system meets their requirements. Usually, acceptance testing is the last
round of testing before the system is handed over to its users.
There are two types of acceptance testing and these are:
1. Alpha testing – user testing of a completed information system using simulated data
2. Beta testing – user testing of a completed information system using real data in the realuser environment
In alpha testing, the whole system is implemented in a test environment to find out whether the system is openly destructive to itself or
to the rest of the environment. There are several types of tests done during alpha testing and these are as follows:




Recovery testing – forces the software (or environment) to fail in order to verify thatrecovery is properly performed
Security testing – verifies that protection mechanisms built into the system will protect itfrom improper penetration
Stress testing – tries to break the system
Performance testing – determines how the system performs in the range of possible environments in which it may be used;
often the goal is to have the system perform with similar response time and other performance measures in each
environment.
The purpose of beta testing is to ascertain whether the software, documentation, technical support, and training activities work as
planned. Beta testing can be considered as a preparation of the installation phase. Problems not covered in alpha and beta testing in any
of these areas should be fixed before users can accept the system.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Installation
After the new system has been developed and tested, it must be installed and placed into operation. Installation is the process of moving
from the current information system to the new one. There are many constraints when installing a new system and making it
operational. These include cost,customer relations, employee relations, logistical complexity, and overall exposure to risk. Some other
important issues to consider when planning installation are as follows:




Incurring costs operating both systems in parallel
Detecting and correcting errors in the new system
Potentially disrupting the company and its IS operations
Training personnel and familiarizing customers with new procedures
Approaches to Installation
There are different approaches to installation and the most commonly used are:
1. Direct installation
2. Parallel installation
3. Phased installation
Details of these approaches are discussed in the succeeding subsections.
Direct Installation
In direct installation, the old system is turned off and the new system is turned on. The figure below shows the timeline for direct
installation.
In direct installation, the users use the new system. Whatever errors found from the new system will have a direct impact on the
users and how they do their jobs. If the new system fails, considerable delay may occur until the old system can operate again and
business transactions arere-entered to make the database updated.
The main advantage of direct installation is its simplicity. There are fewer logistical issues to manage fewer resources required
because the old and new systems are not operated in parallel. However, the drawback of direct installation is its risk. There is no
backup when the new system fails because older systems are not operated in parallel. Moreover, direct installation requires a
complete installation of the whole system.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
In general, direct installation is used in one or both of the following conditions:


The new system is not replacing an older system (automated or manual).
Downtime of days or weeks can be tolerated
If neither of the condition applies, then parallel or phased installation is used to minimize the riskof system unavailability.
Parallel Installation
In parallel installation, the old system continues to operate along with the new system until the users and management are satisfied
with the performance of the new system and has been thoroughly tested and determined to be error-free and ready to operate
independently. All of the work done by the old system is performed in parallel by the new system. The time allotted for parallel
operation is often determined ahead and limited to minimize the cost of dual operation. The figure below illustrates the timeline for
parallel installation.
An advantage of parallel installation is its low risk of system failure and the negative consequences that may result from that failure. If
both systems are operated completely, then the old system serves as a backup for the new system. Any failure in the new system can
be mitigated by relyingon the old system.
A parallel installation can be very expensive. Since two systems are running,
it implies employing and paying two staffs to operate and maintain them. In
addition, parallel installation can be confusing to users because they are
dealing with both systems.
A parallel approach may not be possible or feasible if the users of the system
(suchas customers) cannot tolerate redundant effort or if the size of the system
is large.
Phased Installation
In Phased Installation, the new system is installed and brought into operation in a series of steps or phases. Components or functions
are added to the operational system on each phase. The system is tested in each phase to make sure that it is ready for the next phase.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Phased installation can be combined with parallel installation, especially when the new system will take over the operation of multiple
existing systems.
The main benefit of phased installation is that it reduced risk because
failure of a single phase is less problematic than failure of an entire
system. However, its drawbackis that it increased complexity. Dividing the
installation into phases makes more activities and milestones,hence making
the whole process more complex. Though each individual phase includes a
smaller and more manageable set of activities. Phased installation is useful
mainly when a system is large, complex, and composed of relatively
independent subsystems. If these subsystems are not substantially
independent, then it is hard or impossible to define separate installation
phases.
C. Suggested Readings/Videos
 https://www.scribd.com/document /513459428/PROG301-Application-Development-and-Emerging-Technologies
D. Assessment Tasks
ENRICHMENT ACTIVITY
1. Good software can be characterized on three grounds: one is operability which tells us howwell software works in operations.
Choose three factors where it can be measured and discuss it in your own words.
2. Software paradigms are commonly used to develop large software applications. Give an example where it can be applied and
explain its use in that field.
3. What is the importance of continuous evolution in software? Provide an example by citing well-known applications which
have obtained transformation over the years.
MODULE #1: ASSESSMENT
1.
2.
3.
4.
In your own understanding, what is a software? How is it related to hardware and peopleware?
What are the software paradigms and how do they affect software development?
Which phase of SDLC is the most critical part? Justify you answer by citing an example.
Why is it important for any organization to integrate training and support in theircomputing infrastructure?
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
A. Week No. 5-9.5
Module No. 4
RESEARCH DESIGN AND TESTING Time Allocation: 4.5hrs lec / 6.75
hrs lab
COURSE
INTENDED LEARNING
LEARNING
ASSESSMENT TASKS
REFERENCES
OUTCOMES
OUTCOMES
TASKS/ACTIVITIES
 Learn on how to
Understand
the
 https://www.scribd.c
interpret a data
importance of research Make a research applying the SDLC
om/document
 Learn different ways design and testing process
/513459428/PROG3
on how to manage a along
with
its
01-Applicationdata.
components and
Development-and Describe the
guidelines
Emergingrequirements
Technologies
analysis process
and techniques
 Use the correct
usability testing
method for a
software
development
 Distinguish a proper
deployment plan
based on real-life
scenarios.
B. Learning Tasks/Activities (Lesson Proper)
Getting Started:
•
Software design is a process to transform user requirements into some
suitable form, which helps the programmer in software coding and
implementation.
•
The design phase of software development deals with transforming the
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
customerrequirements.
•
Software design is the process of conceptualizing the software requirements
into software implementation.
•
The design process establishes a plan that takes the user requirements as challenges and works to identify optimum
solutions. The plan should determine the best possible design for implementing the intended solution.
Components of Software Design Process
•
Software requirements specification. This document describes the expected behavior of the system in the form of functional
and non-functional requirements. These requirements should be clear, actionable, measurable, and traceable to business
requirements. Requirements should also define how the software should interact with humans, hardware,and other systems.
•
High-level design. The high-level design breaks the system’s architectural design into a less-abstracted view of sub-systems
and modules and depicts their interaction with each other. This high-level design perspective focuses on how the system,
along with all its components, implements in the form of modules. It recognizes the modular structure of each sub-system
and their interaction among one another.
•
Detailed design. Detailed design involves the implementation of what is visible as a system and its sub-systems in a high-level
design. This activity is more detailed towards modules and their implementations. It defines a logical structure of each
module and theirinterfaces to communicate with other modules.
Why software design is important?
•
Software design can be done with several different ways.
•
It can be done utilizing some software using some modeling language, such as UML, it can be written text and images or it can
even be a drawing on a whiteboard.
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
•
Important here is that the design can be saved and revisited during the development of the software — The design will need
some refining so if you don’t want to always draw the design to the whiteboard from scratch, it might be good idea to stay
with digital ways of doing the design.
•
This and how it’s done of course depends on project needs. Small projects can easily be just drawn or written on a single
paper while bigger projects usually tend to change a lot during their lifetime affecting also the software design.
Modularity
•
Split your software into smaller pieces with maybe maximum of 5–10 interfaces. These interface “groups” are called software
components. Main idea of the software component is to provide a single purpose for the software that is being developed.
•
When you have a modular software, it’s easy to move or even remove things if needed and even share the design work
between multiple developers per software component. Having modularity also increases maintainability by making it easier to
find necessary information to edit from the right component. It can also be basis for your source code name spacing or
structure as well as isolating the test cases per component.
Maintainability
•
With good software design it’s easier to maintain the software. You can spot straight awayfrom the design how much a bug fix
or introduction of a new feature will change the existing code base.
•
As good design should also show interactions between software components and their interfaces, it will also reveal possible
effects of changing code in another component that depends on the one needing the change.
•
Working especially with old code bases that do not have any software design can be very painful and cause many unexpected
bugs.
Performance
•
Good software design can be used to easily pinpoint performance bottlenecks in your
software — especially if the design is done to the level of that granularity.
•
This means the design should tell how your system works internally and how it uses resources such as threads, database
connections and other things that might make a hit to the performance.
•
Sometimes it’s very easy to debug or use some logging functionality to find the bottlenecks from the source code but
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
sometimes the design can tell it by a single image.
Portability
•
By including dependencies to other software modules, such as 3rd party libraries, in to your design makes the software much
easier to port into another environment.
•
Having these documented in a single place makes it super easy to discover what needs to be changed if using another
environment or if it can be done at all.
Usability
•
Generating a design document for your customers from the software design is a good idea.It provides them an overview how
the software they are about to take into use works.
•
You might need to consider if you want to publish only your public interfaces and leave your internal design out of the
document as good design makes it possible to very easily write the software from scratch.
Trackability
•
Usually projects have requirements coming from either a customer or from an internal source. Good design also tracks the
requirements and proves on the design level that all that is required from a piece of software is actually there and that it’s
understood correctly.
•
This brings even more value to the provided design document as the customers can actuallysee what of their requirements are
done and where.
•
To integrate this with source code, some kind of linking between the design, requirements and the source code is more than
advised.
Deployment
•
•
Design should also provide information what the software deliverables are and where should they be placed in the
deployment.
This information is very important for your customers as well as integration as they need to know where to look for your
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
library/executable/whatever your software is about.
• It makes it easier to spot right away if the latest delivery is missing some crucial parts of the software by simply taking a look
at your design.
C. Suggested Readings/Videos
 http://highered.mcgraw-hill.com/sites/dl/free/0073376736/596593/AppendixD.pdf
D. Assessment Tasks
Enrichment Activity
Make a research applying the SDLC process. Include all processes identified on this module. The user fishbone in defining the gaps and
techniques on data gathering should apply only based on the current circumstances that we have. In doing the output of the research, use
the following:
i. Proposed topic
ii. Rationale
iii. Research Questions
iv. Significance of the Study
Assessment
1. Explain in your own words, what software design is. Give an example on how you canmake a good system design.
2. What is the importance of doing software testing?
3. What are the different testing styles that you can use in your system? What is morefeasible in your project?
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
A. Week No. 10-13.5
Module No. 5 CREATING AND USING OBJECTS Time Allocation: 4.5hrs lec / 6.75 hrs lab
COURSE
INTENDED LEARNING
LEARNING
ASSESSMENT TASKS
REFERENCES
OUTCOMES
OUTCOMES
TASKS/ACTIVITIES
 Discuss the classes and
Multiple Choice
object
Identify the tools and layout of
 Android
 Discuss the creating and
android studio
Programming
using object
Cookbook, Java
 Introduce the installation
Codes Geek, 2013
process
B. Learning Tasks/Activities (Lesson Proper)
What is Android?
Android is a mobile operating system currently developed by Google, based on the Linux kernel and designed primarily for touchscreen
mobile devices such as smartphones and tablets. And as we said before, Android offers a unified approach to application development
for mobile devices. Android is an open-source operating system named Android. Google has made the code for all the low-level "stuff"
as well as the needed middleware to power and use an electronic device, and gave Android freely to anyone who wants to write code
and build the operating system from it. There is even a full application framework included, so third-party apps can be built and installed,
then made available for the user to run as they like. The "proper" name for this is the Android Open Source Project, and this is what
people mean when they say things like Android is open and free. Android, in this iteration, is free for anyone to use as they like.
Installing Android Studio
In order to write an Android application, we are going to need a development environment. Google has made a very useful tool for all
Android Developers, the Android Studio. Android Studio is the official IDE for Android development, and with a single download includes
everything you need to begin developing Android apps. Included in the download kit, are the Software Development Kit (SDK), with all
Page 48 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
the Android libraries we may need, and the infrastructure to download the many Android emulator instances, so that we can initially run
our application, without needing a real device. So, we are going to download and install Android Studio.
First we have to have installed the Java Development Kit (JDK) from Oracle. If you do not, please you should download the latest JDK
from the Oracle’s special section here.
Page 49 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 1.1: Android Studio Installation - step 1
Page 50 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Page 51 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 1.2: Android Studio Installation - step 2
Page 52 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Page 53 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 1.3: Android Studio Installation - step 3
Page 54 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Page 55 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 1.4: Android Studio Installation - step 4
Page 56 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Page 57 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 1.5: Android Studio Installation - step 5
Figure 1.6: Android Studio Installation – Ready
Page 58 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Android versions and Android SDK Manager
Google, releases almost every year (or even sooner than a year), a new Android version in order to update the mobile operating system,
so that it contains new features and possibilities and of course to fix things that might not work in the right way. So, each version of
Android has it’s own SDK (software development kit), so that we can use to build apps that can run on and include all the latest features
Android has added in its latest versions. This means that it is essential that we keep up updating our applications with the latest features
all the time, and if possible, without losing the consistency of the previous Android versions. As part of the Setup Wizard you will already
have the latest SDK available to you, however it’s useful to know how to install additional SDK’s if you need to work with older devices
that do not run the latest version of Android. SDK’s allow you to create AVD’s (Android Virtual Devices) to test your Apps on, customized
to your personal configuration. Want to see how your Android App looks on a TV sized screen? If you have a screen big enough you
can find out.
Supporting different screen sizes
Android runs on a variety of devices that offer different screen sizes and densities. This means that Android can handle applications that
run on small mobile phone devices, as well as applications that run on large tablet densities.
This feature gives Android a great advantage, but also, although the system performs scaling and resizing on different screens,
developers should make the effort to optimize their application for different screen sizes and densities. Android system provides a
consistent development environment across devices and handles most of the work to adjust each application’s user interface to the
screen on which it is displayed. At the same time, the system provides APIs that allow you to control your application’s UI for specific
screen sizes and densities, in order to optimize your UI design for different screen configurations. For example, you might want a UI for
Page 59 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
tablets that’s different from the UI for handsets. Below is an introduction to the terms and concepts used, a summary of the screen
configurations that the system supports, and an overview of the API and underlying screen-compatibility features:
Screen size Actual physical size, measured as the screen’s diagonal. For simplicity, Android groups all actual screen sizes into four
generalized sizes: small, normal, large, and extra-large.
Screen density The quantity of pixels within a physical area of the screen; usually referred to as dpi (dots per inch). For example, a
"low" density screen has fewer pixels within a given physical area, compared to a "normal" or "high" density screen. For simplicity,
Android groups all actual screen densities into six generalized densities: low, medium, high, extra-high, extraextra- high, and extraextra-extra-high.
Orientation The orientation of the screen from the user’s point of view. This is either landscape or portrait, meaning that the screen’s
aspect ratio is either wide or tall, respectively. Be aware that not only do different devices operate in different orientations by default, but
the orientation can change at runtime when the user rotates the device.
Resolution The total number of physical pixels on a screen. When adding support for multiple screens, applications do not work directly
with resolution; applications should be concerned only with screen size and density, as specified by the generalized size and density
groups.
Density-independent pixel (dp) A virtual pixel unit that you should use when defining UI layout, to express layout dimensions or
position in a density-independent way. The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which is
the baseline density assumed by the system for a "medium" density screen. At runtime, the system transparently handles any scaling of
the dp units, as necessary, based on the actual density of the screen in use. The conversion of dp units to screen pixels is simple: px =
dp * (dpi / 160). For example, on a 240 dpi screen, 1 dp equals 1.5 physical pixels. You should always use dp units when defining your
application’s UI, to ensure proper display of your UI on screens with different densities. Android provides support for multiple screen
Page 60 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
sizes and densities, reflecting the many different screen configurations that a device may have. You can use features of the Android
system to optimize your application’s user interface for each screen configuration and ensure that your application not only renders
properly, but provides the best user experience possible on each screen. To simplify the way that you design your user interfaces for
multiple screens, Android divides the range of actual screen sizes and densities into sizes: small, normal, large, and xlarge
A set of six generalized densities:
• ldpi (low) ~120dpi
• mdpi (medium) ~160dpi
• hdpi (high) ~240dpi
• xhdpi (extra-high) ~320dpi
• xxhdpi (extra-extra-high) ~480dpi
• xxxhdpi (extra-extra-extra-high) ~640dpi
Android Project Structure
Before we try to make our first Android application, we should first see the basic parts of an Android application project, in order to
recognize them and be able to understand them better.
• Activities The Activities are the main Java classes, that contain the Android code with which we are going to develop, what do we
want the application to do.
• Layouts The Layouts are the main xml files, that contain the Android xml code with which we are going to develop, how will
our application views look like.
• Values The Layouts are the main xml files, that contain the Android xml code with which we are going to develop, how will
our application views look like.
– Animation Resources
Page 61 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
– Color State List Resource
– Drawable Resources
– Layout Resource
– Menu Resource
– String Resources
– Style Resource
• Drawables A drawable resource is a general concept for a graphic that can be drawn to the screen. There are several different
types of drawables:
– Bitmap File</span> A bitmap graphic file (.png, .jpg, or .gif). Creates a BitmapDrawable.
– Nine-Patch File</span> A PNG file with stretchable regions to allow image resizing based on content (.9.png). Creates a
NinePatchDrawable.
– Layer List</span> A Drawable that manages an array of other Drawables. These are drawn in array order, so the element with the
largest index is be drawn on top. Creates a LayerDrawable.
– State List</span> An XML file that references different bitmap graphics for different states (for example, to use a different image when
a button is pressed). Creates a StateListDrawable.
– Level List</span> An XML file that defines a drawable that manages a number of alternate Drawables, each assigned a maximum
numerical value. Creates a LevelListDrawable.
– Transition Drawable</span> An XML file that defines a drawable that can cross-fade between two drawable resources.
Creates a TransitionDrawable.
– Inset Drawable</span> An XML file that defines a drawable that insets another drawable by a specified distance. This is useful when a
View needs a background drawble that is smaller than the View’s actual bounds.
– Clip Drawable</span> An XML file that defines a drawable that clips another Drawable based on this Drawable’s current level value.
Creates a ClipDrawable.
– Scale Drawable</span> An XML file that defines a drawable that changes the size of another Drawable based on its current level
value. Creates a ScaleDrawable
Page 62 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
– Shape Drawable</span> An XML file that defines a geometric shape, including colors and gradients. Creates a ShapeDrawable.
Once our app is ready, we will use a build tool to compile all the project files and package them together into an .apk file that you can
run on Android devices and/or submit to Google Play.
C. Suggested Readings/Videos
 Android Programming Cookbook, Java Codes Geek, 2013
D. Assessment Tasks
Exercises / Hands on Activity
Q1. Android is an open source, Linux-based software stack.
a. True
b. False
Q2- Which of the following choices is the main role of the button which is illustrated in the red rectangle over the Android Studio tool
bar?
a- Run button. b. Debug button. c- Apply changes button.
d- ADV manager button.
Page 63 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Q3. Each Android application runs in its own process and with its own instance of ART on devices running Android version 8.0 (API
Level 26) or higher.
a. True
b. False
Q4-Which of the following choices is the main role of the Preview button which is illustrated in the red circle of the vertical Android
Studio tool bar?
a- It shows the activity layout in text (XML) and design mode at the same time. b- It shows the activity layout in print review. c- It shows
the Java or Kotlin code of an activity. d- It shows the activity blue print preview mode.
Q5. The Android library code is organized in such a way that it can be used by multiple Android applications.
a. True
b. False
Page 64 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Q6- The following image shows part of the content inside file activity_main.xml in an Android application:
Which of the following options is correct?
a- The app user can select one radio button only at a time.
b- The app user can select the two radio buttons at the same time.
c- The only purpose of RadioGroup tag is adding a group of colors to the inside of the radio buttons.
d- This is not an XML code; it is a Kotlin code.
Q7- android.view : This library contains the basic classes used for developing graphical user interface and for handling the user’s
interaction with the user interface
a. True
b. False
Q8- Fill in the blank space in the following sentence with the correct choice:
The …………………… arranges widgets in positions relative to each other.
a- RelativeLayout
b- Linear Layout
Page 65 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
c- ConstraintLayout
d- Table Layout
Q9- android.widget : This library contains (mostly visual) user interface components such as Button, Spinner, ListView to be used in
your applications.
a. True
b. False
Q10- Fill in the blank space in the following sentence with the correct choice:
The ………………………… is a layout that arranges other views either horizontally in a single column or vertically in a single row.
a- LinearLayout
b- RelativeLayout
c- ConstraintLayout
d- Frame Layout
A. Week No. 10-13.5 Module No. 6 ANDROID PROJECT MIGRATION FROM ECLIPSE TO ANDROID STUDIO
Time
Allocation: 4.5hrs lec / 6.75 hrs lab
COURSE
INTENDED LEARNING
LEARNING
ASSESSMENT TASKS
REFERENCES
OUTCOMES
OUTCOMES
TASKS/ACTIVITIES
 Discuss the migrating
Write a program
 Android
code from Eclipse IDE to
Compile and execute the program
Programming
Android Studio
Cookbook, Java
 Demonstrate the
Codes Geek, 2013
execution in Android
Studio
 Demonstrate how do the
migrating work
 Discuss the Gradle and
Page 66 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
build.gradle
B. Learning Tasks/Activities (Lesson Proper)
Android Studio new project structure
Eclipse provides workspaces as a common area for grouping related projects, configurations, and settings. In Android Studio, each
instance of Android Studio contains a top-level project with one or more app modules. Each app module folder contains the equivalent
to an Eclipse project, the complete source sets for that module, including src/main and src/androidTest directories, resources, build file,
and the Android manifest. In general, to update and build your app you modify the files under each module’s src/main directory for
source code updates, the gradle.build file for build specification, and the files under src/androidTest directory for test case creation. Also
due to the structural differences between Android Studio projects vs Eclipse ADT projects, they cannot co-exist. Here is a table of the
main differences:
Page 67 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 2.1: Eclipse - Android Studio Comparison
Gradle and build.gradle
Gradle is a build and automation tool, that can automate our building, testing, deploying tasks and many more. Gradle is the next
generation build system for Java technologies that includes some advantages from older tools like Ant or Maven systems. Android
Studio uses the power of Gradle, in order to provide all the above advantages, such as build variants and multiple apk file generation.
Android Studio projects contain a top-level build file and a build file for each module. The build files are called build.gradle, and they are
plain text files that use Groovy syntax to configure the build with the elements provided by the Android plugin for Gradle. In most cases,
you only need to edit the build files at the module level.
It looks like this:
Page 68 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
apply plugin: ’com.android.application’
android {
compileSdkVersion 19
buildToolsVersion "19.0.0"
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile(’proguard-android.txt’), ’proguard-rules. pro’
}
}
}
dependencies {
compile project(":lib")
compile ’com.android.support:appcompat-v7:19.0.1’
compile fileTree(dir: ’libs’, include: [’*.jar’])
Simple Eclipse ADT project migration to Android Studio
Here, we have an example of this Eclipse ADT project migration to Android Studio. In this example, we are going to migrate the eclipse
project that we created in this example: Android Google Maps v2 Tutorial. This is a wonderful example of how we are going to migrate
a simple application project that has a java class package and a Google Play Services library dependency. So, we are going to take this
code, import it and compile it under Gradle system, and run it. Open Android Studio and choose "Start a new Android Studio Project" in
the welcome screen.
Page 69 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 2.2: Welcome to Android Studio screen. Choose Start a new Android Studio Project.
Specify the name of the application, the project and the package.
Page 70 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 2.3: "Configure your new project" screen. Add your application name and the projects package name.
In the next window, select the form factors your app will run on.
Page 71 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Page 72 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 2.4: "Target Android Devices" screen.
Page 73 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
In the next window you should choose to "Add an activity to Mobile". In our example, we will choose to create a project with no activity,
because we will migrate our Activities for the eclipse formed project. So, choose: "Add no activity".
Figure 2.5: Add an activity to Mobile. Choose: Add no activity.
Now, our project has just been created. This is how it looks like in the "Android" project view:
Page 74 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Page 75 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Page 76 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 2.6: A new Android Studio project has just been created. This is how it looks like.
Java code and resources migration
As we discussed above, there are some pretty significant changes between the project structures between Eclipse ADT and Android
Projects. The biggest is that both Java classes and the Android resources folder, are under app/src/main/ directory. We are going to
copy our Java classes alone, inside the app/java/com.javacodegeeks.androidgooglemapsexam ple folder, as we see it in Android
package view. After this, we are going to copy also our eclipse resources folders under app/res/ folder, as we see it in Android package
view. If this suggest to overwrite some files and folders, we do it cautiously. We should now have something like this:
Page 77 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 2.7: This is how our projects looks like, after we have also moved inside our Java and resource folders.
AndroidManifest.xml and build.gradle file
Then, we move on copying our AndroidManifest.xml file. In Android Studio project structure, we can find our manifest files inside the
app/manifests folder. We overwrite the Android Studio project AndroidManifest.xml with our eclipse project manifest xml.
We should now have something like this:
Page 78 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 2.8: This is our AndroidManifest.xml. This is located in app manifests folder
Page 79 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 2.9: Here is our build.gradle file.
Page 80 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
We write something like this:
build.gradle
apply plugin: ’com.android.application’
android {
compileSdkVersion 22
buildToolsVersion "23.0.1"
defaultConfig {
applicationId
"com.javacodegeeks.androidgooglemapsexample"
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles
getDefaultProguardFile(’proguardandroid.txt’), ’proguard-rules. pro’
}
}
}
dependencies {
compile fileTree(dir: ’libs’, include: [’*.jar’])
compile ’com.android.support:appcompat-v7:22.2.1’
compile ’com.google.android.gms:play-services:8.1.0’
Page 81 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
}
With compile fileTree(dir:’libs’, include:[’*.jar’]) we add in our Gradle configuration, any external library we might have added in the
app/libs project folder. And with the next line compile ’com.google.android. gms:play-services:8.1.0’ we add in our Gradle configuration
the public repository in which Google supports Google Play Services library with Gradle. In this way we have added Google Play
Services library in our project. This library is going to be compiled and packaged in our application project!
Page 82 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 2.10: This is our build.gradle configuration file.
We, now, have to sync our project, and run this module, by pressing the "run" green button. If everything is the right place, and
especially the application package names are the right ones, then we should see our project run.
Page 83 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 2.11: This is the running confirmation screen.
Page 84 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
This was the Android Project migration from Eclipse to Android Studio example. This example was a theoretical one. From now on we
are going to present examples in Android Studio IDE, as Google has stopped support on Eclipse ADT. Additionally,Android Studio is
now the official Android IDE!
C. Suggested Readings/Videos
 Android Programming Cookbook, Java Codes Geek, 2013
D. Assessment Tasks
Hands-on activity
Exercise 1:
Modify the program so that in place of the rectangle a triangle will be drawn. You should modify the .xml file so that the text
’Triangle’ is selectable with the radio buttons.
The Canvas class does not provide a single method to draw a triangle, but the triangle can be drawn by using a class named
Path. With the Path class it is possible to specify a path through selected graphical points. The Path class is used, for
example, in the example app FlyingArrow. A Path object that specifies a triangle can be constructed, for example, with the
following statements.
Path triangle_path = new Path() ;
triangle_path.moveTo( view_center_point_x, view_center_point_y - 80 ) ;
triangle_path.lineTo( view_center_point_x + 96, view_center_point_y + 80 ) ;
triangle_path.lineTo( view_center_point_x - 96, view_center_point_y + 80 ) ;
triangle_path.close() ;
Page 85 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
When the Path object that represents the triangle is constructed with the above statements,
the triangle will appear in the middle of the View object, and it is not necessary to adjust the
zero point of the graphical coordinate system.
Exercise 2:
Improve the program so that a new shape named "Piece of Cake" can be selected. To make this happen you must specify a new
RadioButton to the .xml file. Only the .xml file needs to be modified to make the new RadioButton visible. You can test your
program after this modification, and do the actual drawing operation later.
When "Piece of Cake" is selected, the application should look like the following.
Page 86 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
A "Piece of Cake" can be drawn by using a Canvas method named drawArc(). By studying the file DrawingDemoActivity.java of the
DrawingDemo app, you can find out how to use the method.
For the drawArc() method angles are specified clockwise, not counter clockwise as in many other systems. Rectangles in Android are
specified with the coordinates of upper left corner and lower right corner.
A. Week No. 14-18
Module No. 7 ARTIFICIAL INTELLIGENCE
Time Allocation: 4.5hrs lec / 6.75 hrs lab
COURSE
INTENDED LEARNING
LEARNING
ASSESSMENT TASKS
REFERENCES
OUTCOMES
OUTCOMES
TASKS/ACTIVITIES
 Apply the basic principles Classify the various ESSAY QUESTION TYPE
Artificial Intelligence –
, models, and algorithms definitions you find into a
Agents and
of AI to recognize
set
of
different
Environments 1st edition
 Solve problems in the categories.
© 2014 William Teahan
analysis and design of
& bookboon.com
information systems
 Analyze the structures
and algorithms of a
selection of techniques
related to searching,
reasoning,
machine
learning, and language
processing.
Page 87 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
B. Learning Tasks/Activities (Lesson Proper)
What is Artificial Intelligence?
According to the father of Artificial Intelligence John McCarthy, it is “The science and engineering of making intelligent machines,
especially intelligent computer programs”. Artificial Intelligence is a way of making a computer, a computer-controlled robot, or a
software think intelligently, in the similar manner the intelligent humans think.AI is accomplished by studying how human brain thinks,
and how humans learn, decide, and work while trying to solve a problem, and then using the outcomes of this study as a basis of
developing intelligent software and systems.
Philosophy of AI
While exploiting the power of the computer systems, the curiosity of human, lead him to wonder, “Can a machine think and behave like
humans do?” Thus, the development of AI started with the intention of creating similar intelligence in machines that we find and regard
high in humans. Goals of AI
 To Create Expert Systems: The systems which exhibit intelligent behavior, learn,
demonstrate, explain, and advice its users.
 To Implement Human Intelligence in Machines: Creating systems that
understand, think, learn, and behave like humans.
What Contributes to AI?
Artificial intelligence is a science and technology based on disciplines such as Computer Science, Biology, Psychology, Linguistics,
Mathematics, and Engineering. A major thrust of AI is in the development of computer functions associated with human intelligence,
such as reasoning, learning, and problem solving. Out of the following areas, one or multiple areas can contribute to build an
intelligent system.
Page 88 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Programming Without and With AI
The programming without and with AI is different in following ways:
Page 89 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
What is AI Technique?
In the real world, the knowledge has some unwelcomed properties:
 Its volume is huge, next to unimaginable.
 It is not well-organized or well-formatted.
 It keeps changing constantly.
AI Technique is a manner to organize and use the knowledge efficiently in such a way that:
 It should be perceivable by the people who provide it.
 It should be easily modifiable to correct errors.
 It should be useful in many situations though it is incomplete or inaccurate.
AI techniques elevate the speed of execution of the complex program it is equipped with.
Applications of AI
AI has been dominant in various fields such as:
 Gaming
Page 90 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
AI plays crucial role in strategic games such as chess, poker, tic-tac-toe, etc., where
machine can think of large number of possible positions based on heuristic knowledge.
 Natural Language Processing
It is possible to interact with the computer that understands natural language spoken
by humans.
 Expert Systems
There are some applications which integrate machine, software, and special
information to impart reasoning and advising. They provide explanation and advice to
the users.
 Vision Systems
These systems understand, interpret, and comprehend visual input on the computer.
For example,
 A spying aeroplane takes photographs which are used to figure out spatial
 information or map of the areas.
 Doctors use clinical expert system to diagnose the patient.
 Police use computer software that can recognize the face of criminal with the
 stored portrait made by forensic artist.
 Speech Recognition
Some intelligent systems are capable of hearing and comprehending the language in terms of sentences and their meanings while a
human talks to it. It can handle different accents, slang words, noise in the background, change in human’s noise due to cold, etc.
 Handwriting Recognition
The handwriting recognition software reads the text written on paper by a pen or on screen by a stylus. It can recognize the shapes of
the letters and convert it into editable text.
Page 91 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
 Intelligent Robots
Robots are able to perform the tasks given by a human. They have sensors to detect physical data from the real world such as light,
heat, temperature, movement, sound, bump, and pressure. They have efficient processors, multiple sensors and huge memory, to
exhibit intelligence. In addition, they are capable of learning from their mistakes and they can adapt to the new environment.
History of AI
Here is the history of AI during 20th century:
Page 92 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
While studying artificially intelligence, you need to know what intelligence is. This chapter covers Idea of intelligence, types, and
components of intelligence.
What is Intelligence?
The ability of a system to calculate, reason, perceive relationships and analogies, learn from experience, store and retrieve information
from memory, solve problems, comprehend complex ideas, use natural language fluently, classify, generalize, and adapt new situations.
Types of Intelligence
As described by Howard Gardner, an American developmental psychologist, the Intelligence comes in multifold:
Page 93 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
You can say a machine or a system is artificially intelligent when it is equipped with at least one and at most all intelligences in it.
Page 94 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
What is Intelligence Composed of?
The intelligence is intangible. It is composed of:
1. Reasoning
2. Learning
3. Problem Solving
4. Perception
5. Linguistic Intelligence
Let us go through all the components briefly:
1. Reasoning: It is the set of processes that enables us to provide basis for judgement, making decisions, and prediction. There
are broadly two types:
Page 95 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
2. Learning: It is the activity of gaining knowledge or skill by studying, practising, being taught, or experiencing something.
Learning enhances the awareness of the subjects of the study.
The ability of learning is possessed by humans, some animals, and AI-enabled systems. Learning is categorized as:
• Auditory Learning: It is learning by listening and hearing. For example, students listening to recorded audio lectures.
• Episodic Learning: To learn by remembering sequences of events that one has witnessed or experienced. This is linear
and orderly.
• Motor Learning: It is learning by precise movement of muscles. For example, picking objects, Writing, etc.
• Observational Learning: To learn by watching and imitating others. For example, child tries to learn by mimicking her
parent.
• Perceptual Learning: It is learning to recognize stimuli that one has seen before.
• For example, identifying and classifying objects and situations.
• Relational Learning: It involves learning to differentiate among various stimuli on the basis of relational properties, rather
than absolute properties. For Example,
Page 96 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
•
•
•
•
Adding ‘little less’ salt at the time of cooking potatoes that came up salty last time, when cooked with adding say a
tablespoon of salt.
Spatial learning: It is learning through visual stimuli such as images, colors,
maps, etc. For Example, A person can create roadmap in mind before actually following the road.
Stimulus-Response Learning: It is learning to perform a particular behavior when a certain stimulus is present. For
example, a dog raises its ear on hearing doorbell.
•
3. Problem solving: It is the process in which one perceives and tries to arrive at a desired solution from a present situation by
taking some path, which is blocked by known or unknown hurdles. Problem solving also includes decision making, which is the
process of selecting the best suitable alternative out of multiple alternatives to reach the desired goal are available.
4. Perception: It is the process of acquiring, interpreting, selecting, and organizing sensory information. Perception presumes
sensing. In humans, perception is aided by sensory organs. In the domain of AI, perception mechanism puts the data acquired by
the sensors together in a meaningful manner.
5. Linguistic Intelligence: It is one’s ability to use, comprehend, speak, and write the verbal and written language. It is important in
interpersonal communication.
Difference between Human and Machine Intelligence
• Humans perceive by patterns whereas the machines perceive by set of rules and data.
• Humans store and recall information by patterns, machines do it by searching
• algorithms. For example, the number 40404040 is easy to remember, store and recall
• as its pattern is simple.
• Humans can figure out the complete object even if some part of it is missing or
• distorted; whereas the machines cannot correctly.
Page 97 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
C. Suggested Readings/Videos
 Artificial Intelligence – Agents and Environments 1st edition © 2014 William Teahan & bookboon.com
D. Assessment Tasks
Exercises
1.1
What is ”Artificial Intelligence”?
Exercise 1.1.1:
One of the issues for Artificial Intelligence research concerns the problem of categorization for intelligent systems – the problem
of how to select suitable categories to cover a set of examples, and the resultant classification errors that arise once a particular
set of categories has been chosen.
As an example, use your favourite search engine to find out how the term ‘Artificial Intelligence’ is defined by different people.
How is the definition different to the one provided in the first sentence of Section 1.1 of the companion book Artificial Intelligence
– Agents and Environments? Classify the various definitions you find into a set of different categories. Which definitions fit well
into your set of categories? Which definitions pose problems that require a re-evaluation of the suitability of your taxonomical
classification?
1.2
Paths to Artificial Intelligence
Exercise 1.2.1: Computer Science Unplugged Activity – The Turing Test
Computer Science Unplugged (Bell, Witten & Fellows, 1998) is a series of learning activities designed to teach important
concepts from Computer Science without the use of computers. Download the Computer Science Unplugged Activity concerning
the Turing Test from http://csunplugged.org/turing-test and follow the section on ‘What to do’ in order to try out an unplugged
variation of the test for intelligence.
How successful were the participants in this activity at finding out who the ‘computer’ was? In light of the insights you gained from
this activity, do you now believe or not believe the Turing Test is a valid test for intelligence? Explain why.
Page 98 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Exercise 1.2.2:
The person playing the ‘computer’ for this activity must reply to specific questions using pre-determined answers. Several of
these questions and answers have been reproduced in the following table. (For the full set of questions and answers, follow the
URL listed in Exercise 1.2.1).
Question
Answer
What is the name of Bart Simpson’s baby sister?
I can’t remember.
Are you a computer?
Are you a computer?
What is 2 × 78?
166 (This is deliberately incorrect!)
What is the square root of two?
1.41421356237309504878
Add 34957 to 70764.
Wait for about 20 seconds before giving the
answer…105621.
Do you like school?
Yes, I like school.
For which country is the flag a red circle on a white
background?
I don’t know.
What food do you like to eat?
I’m not hungry, thanks.
Do you think these are good questions to ask during the Turing Test as a test for intelligence? Do you think that if you were one
of the judges you would be fooled by these answers? If not, which answers would give the ‘computer’ away?
Page 99 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
A. Week No. 14-18
Module No. 8 POPULAR SEARCH ALGORITHMS
Time Allocation: 4.5rs lec / 6.75 hrs lab
COURSE
INTENDED LEARNING
LEARNING
ASSESSMENT TASKS
REFERENCES
OUTCOMES
OUTCOMES
TASKS/ACTIVITIES
 Understand how to
Perform
Analogy
Artificial Intelligence –
evaluate models
Activities
ESSAY QUESTION TYPE
Agents and
generated from data
Environments 1st edition
 Apply the algorithms to a
© 2014 William Teahan
real problem, optimize
& bookboon.com
the models learned and
report on the expected
accuracy that can be
achieved by applying the
models properties for the
classes
 Explain various AI and
machine learning
algorithms and their
applications
 Describe learning models
and algorithms
B. Learning Tasks/Activities (Lesson Proper)
Searching is the universal technique of problem solving in AI. There are some single-player games such as tile games, Sudoku,
crossword, etc. The search algorithms help you to search for a particular position in such games.
Page 100 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Single Agent Pathfinding Problems
The games such as 3X3 eight-tile, 4X4 fifteen-tile, and 5X5 twenty four tile puzzles are singleagent- path-finding challenges. They
consist of a matrix of tiles with a blank tile. The player is required to arrange the tiles by sliding a tile either vertically or
horizontally into a blank space with the aim of accomplishing some objective.
The other examples of single agent pathfinding problems are Travelling Salesman Problem, Rubik’s Cube, and Theorem Proving.
Search Terminology Problem Space: It is the environment in which the search takes place. (A set of states and set of operators
to change those states) Problem Instance: It is Initial state + Goal state Problem Space Graph: It represents problem state.
States are shown by nodes and operators are shown by edges. Depth of a problem: Length of a shortest path or shortest
sequence of operators from Initial State to goal state. Space Complexity: The maximum number of nodes that are stored in
memory. Time Complexity: The maximum number of nodes that are created. Admissibility: A property of an algorithm to always
find an optimal solution. Branching Factor: The average number of child nodes in the problem space graph. Depth: Length of the
shortest path from initial state to goal state.
Brute-Force Search Strategies
They are most simple, as they do not need any domain-specific knowledge. They work fine
with small number of possible states.
Requirements –
• A set of valid operators
• Initial state
• Goal state description
• State description
Breadth-First Search
It starts from the root node, explores the neighboring nodes first and moves towards the next level neighbors. It generates one tree at a
time until the solution is found. It can be implemented using FIFO queue data structure. This method provides shortest path to the
solution. If branching factor (average number of child nodes for a given node) = b and depth = d, then number of nodes at level d = bd.
The total no of nodes created in worst case is b + b2 + b3 + … + bd.
Page 101 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Disadvantage: Since each level of nodes is saved for creating next one, it consumes a lot of memory space. Space requirement to store
nodes is exponential. Its complexity depends on the number of nodes. It can check duplicate nodes.
Depth-First Search
It is implemented in recursion with LIFO stack data structure. It creates the same set of nodes as Breadth-First method, only in the
different order. As the nodes on the single path are stored in each iteration from root to leaf node, the space requirement to store nodes
is linear. With branching factor b and depth as m, the storage space is bm.
Disadvantage: This algorithm may not terminate and go on infinitely on one path. The solution to this issue is to choose a cut-off depth.
If the ideal cut-off is d, and if chosen cut-off is lesser than d, then this algorithm may fail. If chosen cut-off is more than d, then execution
time increases. Its complexity depends on the number of paths. It cannot check duplicate nodes.
Page 102 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Bidirectional Search
It searches forward from initial state and backward from goal state till both meet to identify a common state. The path from initial state is
concatenated with the inverse path from the goal state. Each search is done only up to half of the total path.
Uniform Cost Search
Sorting is done in increasing cost of the path to a node. It always expands the least cost node. It is identical to Breadth First search if
each transition has the same cost. It explores paths in the increasing order of cost. Disadvantage: There can be multiple long paths with
the cost ≤ C*. Uniform Cost search must explore them all.
Iterative Deepening Depth-First Search
It performs depth-first search to level 1, starts over, executes a complete depth-first search to level 2, and continues in such way till the
solution is found. It never creates a node until all lower nodes are generated. It only saves a stack of nodes. The algorithm ends when it
finds a solution at depth d. The number of nodes created at depth d is bd and at depth d-1 is bd-1.
Page 103 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Comparison of Various Algorithms Complexities
Let us see the performance of algorithms based on various criteria:
Informed (Heuristic) Search Strategies
To solve large problems with large number of possible states, problem-specific knowledge needs to be added to increase the efficiency
of search algorithms.
Heuristic Evaluation Functions
They calculate the cost of optimal path between two states. A heuristic function for sliding tiles games is computed by counting number
of moves that each tile makes from its goal state and adding these number of moves for all tiles.
Pure Heuristic Search
It expands nodes in the order of their heuristic values. It creates two lists, a closed list for the already expanded nodes and an open list
for the created but unexpanded nodes.
In each iteration, a node with a minimum heuristic value is expanded, all its child nodes are created and placed in the closed list. Then,
the heuristic function is applied to the child nodes and they are placed in the open list according to their heuristic value. The shorter
paths are saved and the longer ones are disposed.
A* Search
Page 104 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
It is best-known form of Best First search. It avoids expanding paths that are already expensive, but expands most promising paths first.
f(n) = g(n) + h(n), where
• g(n) the cost (so far) to reach the node
• h(n) estimated cost to get from the node to the goal
• f(n) estimated total cost of path through n to goal. It is implemented using priority queue
by increasing f(n).
Greedy Best First Search
It expands the node that is estimated to be closest to goal. It expands nodes based on f(n) = h(n). It is implemented using priority queue.
Disadvantage: It can get stuck in loops. It is not optimal.
Local Search Algorithms
They start from a prospective solution and then move to a neighboring solution. They can return a valid solution even if it is interrupted
at any time before they end.
Hill-Climbing Search
It is an iterative algorithm that starts with an arbitrary solution to a problem and attempts to find a better solution by changing a single
element of the solution incrementally. If the change produces a better solution, an incremental change is taken as a new solution. This
process is repeated until there are no further improvements. function Hill-Climbing (problem), returns a state that is a local maximum.
inputs: problem, a problem local variables: current, a node neighbor, a node current ←Make_Node(Initial-State[problem]) loop do
neighbor ← a highest_valued successor of current if Value[neighbor] ≤ Value[current] then return State[current] current ← neighbour
end
Disadvantage: This algorithm is neither complete, nor optimal.
Local Beam Search
In this algorithm, it holds k number of states at any given time. At the start, these states are generated randomly. The successors of
these k states are computed with the help of objective function. If any of these successors is the maximum value of the objective
function, then the algorithm stops. Otherwise the (initial k states and k number of successors of the states = 2k) states are placed in a
Page 105 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
pool. The pool is then sorted numerically. The highest k states are selected as new initial states. This process continues until a
maximum value is reached. function BeamSearch( problem, k), returns a solution state. start with k randomly generated states Loop
generate all successors of all k states if any of the states = solution, then return the state else select the k best successors End
Simulated Annealing Annealing is the process of heating and cooling a metal to change its internal structure for modifying its physical
properties. When the metal cools, its new structure is seized, and the metal retains its newly obtained properties. In simulated annealing
process, the temperature is kept variable. We initially set the temperature high and then allow it to ‘cool' slowly as the algorithm
proceeds. When the temperature is high, the algorithm is allowed to accept worse solutions with high frequency.
Start
5. Initialize k = 0; L = integer number of variables;
6. From i -> j, search the performance difference Δ.
7. If Δ <= 0 then accept else if exp(8. Repeat steps 1 and 2 for L(k) steps.
9. k = k + 1;
Repeat steps 1 through 4 till the criteria is met.
End
Travelling Salesman Problem
In this algorithm, the objective is to find a low-cost tour that starts from a city, visits all cities en-route exactly once and ends at the same
starting city.
Start
Find out all (n -1)! Possible solutions, where n is the total number of
cities.
Determine the minimum cost by finding out the cost of each of these
(n -1)!
solutions.
Finally, keep the one with the minimum cost.
end
Page 106 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Exercises
Exercises
RELATED MODELS
See the Hampton Court Maze and Chevening House Maze models.
1):
Draw a set of six nested squares as shown in Figure 3.6.8 on the right. However, draw each square in a different way, as follows:
1.
using a single turtle agent for the innermost square with the shape "square 2";
2.
using a single turtle agent for the next square but drawing it with the pen and the setxy
command;
3.
using a single turtle agent for the next square drawn with the stamp command;
4.
using multiple turtle agents for the next square;
5.
using four link agents between four turtle agents for the next square; and finally
6.
using patch agents for the outermost square.
Hint: Look at the Box Drawing Example in NetLogo’s Models Library as a starting point.
Page 107 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
Figure 3.6.8. Six nested squares. Screenshot from the Nested Squares model.
2):
Import your own environments using the import-pcolors command. Turtles will be able to sense this environment when they move
around within it. Overlay this environment with the original image using the import-drawing command. Us, as observers, can now “see”
what the environment should look like, but the turtles cannot “see” the full detail – they only can sense the imported patches. Add some
turtle agents to your environments (with and without the imported patches via the import-pcolors command) to verify which of the
commands allow the turtle agents to sense them.
3:
Write a NetLogo model that shuffies and deals a pack of cards. You should use the Turtle Shapes Editor in the Tools menu to create
turtle shapes for your pack of cards. You can also use the NetLogo shuffle command to shuffie the cards.
Page 108 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
3.1):
Write a NetLogo model that allows the user to fill in the squares of a Sudoku puzzle. It should check that the number being entered is
correct – that is, the number does not occur elsewhere horizontally, vertically or within the same 3 by 3 grid.
3.2:
Write a NetLogo model that reads in data from the following file:
This data file contains data that specifies the Santa Fe ant trail devised by John Koza in order to test the performance of evolutionary
algorithms. Your ant trail should look similar to the image as shown in Figure 3.6.12.
Figure 3.6.12. The Santa Fe Ant Trail.
Page 109 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
The data file contains a ‘.’ character to indicate that the patch is not on the trail, the ‘1’ character to indicate where the food is on the trail,
and the ‘0’ character to indicate where the trail is but with no food. In the image shown, the non-trail patches are light green, the food
patches on the trail dark green, and the non-food patches on the trail are brown.
The Santa Fe Ant Trail problem is to evolve a computer program that will provide the instructions for an ant to follow the trail. This is an
exercise that will be investigated in Volume 2 of this book series. However, for the exercise here, all that you need to do is have the
model read the trail from the data file and then display it in the environment.
REFERENCE:
 Artificial Intelligence – Agents and Environments 1st edition © 2014 William Teahan & bookboon.com
V. ASSESSMENT GUIDE AND STANDARD
1. The components which will serve as basis for class performance of a student shall be:
For Lecture/Laboratory Class:
a. Performance Task (PT) - 30%
b. Average Quiz (AQ)
- 30%
c. Major Exam (ME)
- 40%
1.1 Performance Task (PT
The criteria for Performance Task shall include but not limited to research output, class participation, report, return
demonstration, and assignment presentation. For laboratory classes, this shall include the group experiments, and the
individual question and answer.
The formula for computing the Performance Task for the period is:
PT =
Total Raw Scores
Total Perfect Scores
X 100%
Page 110 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
1.2 Average Quiz (AQ)
The criteria included in this component are short and long quizzes. Quizzes are given to the students to evaluate the
knowledge and skills acquired from the just concluded discussion and demonstration provided by the teacher. This may be
given before the end of the class or before the start of the next class meeting. Long quizzes are announced quizzes given to
the students to evaluate the knowledge and skills acquired from a chapter’s or a week’s coverage of discussion and
demonstration.
The formula for computing the Average Quiz for the period is:
AQ =
Summation of Percentage of All Quizzes w/in the Exam
Total Number of Quizzes w/in the period
X
100%
1.3 Major Examination (ME)
The major examination refers to a long examination administered during Preliminary, Midterm, Semi-Final, and Final
Examination.
The formula for computing the Major Exam component is:
ME =
Score
X 100%
Total Perfect Score
2. Computation of Prelim/Midterm/Pre-Final/Final Grade:
The formula for computing the Prelim Grade is:
Prelim Grade = (PT x 0.30) + (AQ x 0.30) + (ME x 0.40)
Page 111 of 112
SURIGAO EDUCATION CENTER
Km. 2, National Highway, 8400 Surigao City, Philippines
The same formula is used for computing the Midterm, Pre-Final, and Final Grade.
3. Computation of the Final Grade
The Final Grade is computed using the averaging system:
Average Final Grade =
Prelim Grade + Midterm Grade + Pre-Final Grade +Final Grade
4
Percentage Distribution of Lecture and Laboratory
Lecture
= 50%
Laboratory
= 50%
Page 112 of 112
Download