0% found this document useful (0 votes)
33 views22 pages

CS8494-SE - Model Answer Key

Answer key

Uploaded by

jjeswin027
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views22 pages

CS8494-SE - Model Answer Key

Answer key

Uploaded by

jjeswin027
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Reg.

No

JEPPIAAR INSTITUTE OF TECHNOLOGY


KUNNAM, SUNGUVARCHATRAM, SRIPERUMBUDUR, CHENNAI -631 604
MODEL EXAMINATION- MAY 2022
Answer Key
SUB CODE: CS 8494 SUB TITLE: Software Engineering
Duration: 3 hours Branch / Year / Sem: CSE / II/ 04
Date: 24/05/2022 Maximum: 100 Marks
PART – A (10 x 2 = 20 Marks)
1. What are the umbrella activities of a software process?

1. Software Project tracking and Control


2. Risk Management
3. Software Quality Assurance
4. Formal Technical Review
5. Software Configuration Management
6. Work Production Preparation and production
7. Reusability Management
8. Measurement

2. What is a software process?

Software process can be defined as the structured set of activities that are required to develop the software
system.

The fundamental activities are - 1. Specification 2. Design and Implementation 3. Validation 4. Evolution

3. What UI design patterns are used for the following?

a) Page layout b) Tables c) Navigation through menus and webpages


d) Shopping Cart

Page layout Card Stack

Tables Sorted tables

Navigation through menus & webpages Edit-in place

Shopping Cart Shopping cart which provides list of items


selected for purchase

4. List out the characteristics of good SRS.

1) SRS must be correct.


2) SRS must be unambiguous.
3) SRS must be complete.
4) SRS must be consistent.
5) SRS must be traceable.
5. What is a test case?

Ans. : Test case is a document or a specification of inputs, execution conditions,testing procedure, and
expected results while executing every single test.

6. List out various types of cohesion and coupling.

7. Mention the software testability checklist.

8. Distinguish between verification and validation.

Verification Validation

Verification refers to the set of activities that Validation refers to the set of activities that
ensure software correctly implements the ensure that the software that has been built is
specific function. traceable to customer requirements.

Are we building the product right ? Are we building the right product ?

After a valid and complete specification the Validation begins as soon as project starts.
verification starts.

The verification is conducted to ensure whether Validation is conducted to show that the user
software meets specification or not. requirements are getting satisfied.

9. List two advantages of using COCOMO model.

The two advantages of COCOMO model are –


(1) It predicts the efforts and schedule of software product based on size of the software
(2) It can work on historical data and is more predictable and accurate.

10. Compare: Project Risk vs Business Risk.

Project risks are related to the project objectives.

The business risk is related to uncertainty in profits and danger of loss and the events that could pose a risk.
PART – B (5 x 13 = 65 Marks)

11. (a) (i) Define Agility. List any five principles of Agility. [13]
 The Agile Manifesto, also called the Manifesto for Agile Software
Development, is a formal declaration of four key values and 12 principles to
guide an iterative and people-centric approach to software development.
 The agile methods were developed to overcome the weakness of conventional
software engineering.
Agile Principles
There are famous 12 principles used as agility principles –
1. Satisfy the customer by early and continuous delivery of valuable software.
2. The changes in the requirements must be accommodated. Even though the changes
occur late in the software development process, the agile process should help to
accommodate them.
3. Deliver working software quite often. Within the shorter time span deliver the
working unit.
4. Business people and developers must work together throughput the project.

Explain the phases in extreme programming process.


(ii)
Extreme Programming (XP) is one of the numerous Agile frameworks applied by IT
companies. But its key feature — emphasis on technical aspects of software
development — distinguishes XP from the other approaches.

XP is a set of engineering practices. Developers have to go beyond their capabilities


while performing these practices. That’s where the “extreme” in the framework’s title
comes from. To get a better understanding of these practices, we’ll start with describing
XP’s lifecycle and the roles engaged in the process.

The process and roles of extreme programming :

The XP framework normally involves 5 phases or stages of the development process


that iterate continuously:

1. Planning, the first stage, is when the customer meets the development team and
presents the requirements in the form of user stories to describe the desired
result. The team then estimates the stories and creates a release plan broken
down into iterations needed to cover the required functionality part after part. If
one or more of the stories can’t be estimated, so-called spikes can be introduced
which means that further research is needed.
2. Designing is actually a part of the planning process, but can be set apart to
emphasize its importance. It’s related to one of the main XP values that we’ll
discuss below — simplicity. A good design brings logic and structure to the
system and allows to avoid unnecessary complexities and redundancies.
3. Coding is the phase during which the actual code is created by implementing
specific XP practices such as coding standards, pair programming, continuous
integration, and collective code ownership (the entire list is described below).
4. Testing is the core of extreme programming. It is the regular activity that
involves both unit test to determine if the developed feature works properly) and
acceptance tests (customer testing to verify that the overall system is created
according to the initial requirements).
(OR)
(b) Assume that you are the technical manager of a software development
organization. A client approached you for a software solution. The problems stated
by the client have uncertainties which lead to loss if it not planned and solved. [13]
Which software development model you will suggest for this project – justify.
Explain that model with its pros and cons and neat sketch.

Solution: The uncertainties in problem statement leads to risks in the project. Hence the
spiral model can be used for development of such project.

Spiral model:

The spiral model, initially proposed by Boehm, is an evolutionary software process


model that couples the iterative feature of prototyping with the controlled and
systematic aspects of the linear sequential model. It implements the potential for rapid
development of new versions of the software. Using the spiral model, the software is
developed in a series of incremental releases. During the early iterations, the additional
release may be a paper model or prototype. During later iterations, more and more
complete versions of the engineered system are produced.

Each cycle in the spiral is divided into four parts:


Objective setting: Each cycle in the spiral starts with the identification of purpose for
that cycle, the various alternatives that are possible for achieving the targets, and the
constraints that exists.
Risk Assessment and reduction: The next phase in the cycle is to calculate these
various alternatives based on the goals and constraints. The focus of evaluation in this
stage is located on the risk perception for the project.
Development and validation: The next phase is to develop strategies that resolve
uncertainties and risks. This process may include activities such as benchmarking,
simulation, and prototyping.
Planning: Finally, the next step is planned. The project is reviewed, and a choice made
whether to continue with a further period of the spiral. If it is determined to keep, plans
are drawn up for the next step of the project.
The development phase depends on the remaining risks. For example, if performance or
user-interface risks are treated more essential than the program development risks, the
next phase may be an evolutionary development that includes developing a more
detailed prototype for solving the risks.
The risk-driven feature of the spiral model allows it to accommodate any mixture of a
specification-oriented, prototype-oriented, simulation-oriented, or another type of
approach. An essential element of the model is that each period of the spiral is
completed by a review that includes all the products developed during that cycle,
including plans for the next cycle. The spiral model works for development as well as
enhancement projects.

When to use Spiral Model?


o When deliverance is required to be frequent.
o When the project is large
o When requirements are unclear and complex
o When changes may require at any time
o Large and high budget projects

Advantages
o High amount of risk analysis
o Useful for large and mission-critical projects.

Disadvantages
o Can be a costly model to use.
o Risk analysis needed highly particular expertise
o Doesn't work well for smaller projects.

12. (a) What is requirements elicitation? Briefly describe the various activities [13]
performed in requirements elicitation phase with an example of a watch
system that facilitates to set time and alarm.
Requirement Elicitation
The spiral model as given below depicts the requirement elicitation and analysis
process. The process activities are –
1. Requirement discovery : By having effective communication with the customers
the requirements can be identified.
2. Requirements classification and discovery : All the unstructured requirements
can be categorised systematically depending upon their nature. And they are
arranged in groups.
3. Requirement prioritisation : There are some conflicting requirements. Hence the
requirements are prioritised first. If there are some unrealistic requirements then
negotiations are made and only realistic prioritised requirements are collected. If
any conflict occurs then it its resolved by requirement engineers.
4. Requirement documentation : This is the specification of all the requirements.
And an important requirement document is created.

Solution :
Requirements elicitation is done for watch system by using following steps
1) Requirements discovery : By effective communication with customers the
requirements can be identified.
2) Requirements classification : All unstructured requirements can be classified
systematically and can be arranged in functional and non-functional requirements.
3) Requirements prioritisation : Some requirements are conflicting requirements.
Hence they need to be priortised first. If some requirements are un-realistic, then
they must be eliminated and only realistic requirements are collected.
The functional and nonfunctional requirements for watch system are –
Functional requirements
1) System allows to set time in 12:00 or 24:00 hour display format.
2) It allows to set alarm.
3) System allows to delete the already set alarm.
4) System allows to set timings for snooze.
5) System allows to stop alarm, during alarming.
6) The volume of alarm can be set by user.
7) It should allow to set more than one alarms.
Non-functional requirements
1) It should indicate battery low message if battery is low.
2) The system must be reliable and nobody should hack the system.
Use case diagram

OR

(b) Consider the process of ordering a pizza over the phone. Draw the use case [13]
diagram and also sketch the activity diagram representing each step of the
process, from the moment you pick up the phone to the point where you start
eating the pizza. Include activities that others need to perform. Add exception
handling to the activity diagram you developed. Consider at least two
exceptions delivery person wrote down wrong address, deliver person brings
wrong pizza)

Usecase Diagram:
Activity Diagram:
13. (a) Discuss about the design concepts in a software development process [13]

Software design is an iterative process through which requirements are translated into
the blueprint for building the software.

 Abstraction (2M)
The abstraction means an ability to cope up with the complexity. Software
design occurs at different levels of abstraction
 Procedural Abstraction
 Data Abstraction
 Modularity (2M)
The software is divided into separately named and addressable components that
called as modules.
 Architecture (1M)
Architecture means representation of overall structure of an integrated system. In
architecture various components interact and the data of the structure is used by
various components.
 Refinement (1M)
Refinement is actually a process of elaboration. Abstraction and refinement are
complementary concepts. The major difference is that - in the abstraction low-
level details are suppressed. Refinement helps the designer to elaborate low-level
details.
 Pattern (1M)
Design pattern acts as a design solution for a particular problem occurring in
specific domain.
 Pattern can be reusable.
 Pattern can be used for current work.
 Pattern can be used to solve similar kind of problem
 Information hiding(1M)
Information hiding is one of the important property of effective modular design.
The term information hiding means the modules are designed in such a way that
information contained in one module cannot be accessible to the other module
(the module which does not require this information).
 Functional independence (2M)
The functional independence can be achieved by developing the functional
modules with single-minded approach. By using functional independence
functions may be compartmentalized and interfaces are simplified. The
functional independence is assessed using two qualitative criteria - Cohesion and
coupling.
 Refactoring (1M)
The process of changing a software system in such a way that the external
behaviour of the design do not get changed, however the internal structure gets
improved.
 Design classes (2M)
Design classes are defined as the classes that describe some elements of
problem domain, focus on various aspects of problem from user's point of
view.
OR
(b)
What is software architecture? Describe the different software architectural
styles with examples.
Software Architecture:
Software Architecture is a structure of systems which consists of various
components, externally visible properties of these components and the inter-
relationship among these components.
Architectural Styles:
The commonly used architectural styles are
1. Data centered architectures.
2. Data flow architectures.
3. Call and return architectures.
4. Object oriented architectures.
5. Layered architectures.
1. Data-centered architecture
 The data store in the file or database is occupying at the center of the
architecture.
 Store data is access continuously by the other components like an update,
delete, add, modify from the data store.
 Data-centered architecture helps integrity.
 Pass data between clients using the blackboard mechanism.
 The processes are independently executed by the client components.

2. Data-flow architecture
 This architecture is applied when the input data is converted into a series of
manipulative components into output data.
 A pipe and filter pattern is a set of components called as filters.
 Filters are connected through pipes and transfer data from one component to
the next component.
 The flow of data degenerates into a single line of transform then it is known as
batch sequential.

3. Call and return architectures


This architecture style allows to achieve a program structure which is easy to modify.

Following are the sub styles exist in this category:

1. Main program or subprogram architecture


 The program is divided into smaller pieces hierarchically.
 The main program invokes many of program components in the hierarchy that
program components are divided into subprogram.
2. Remote procedure call architecture
 The main program or subprogram components are distributed in network of
multiple computers.
 The main aim is to increase the performance.
4. Object-oriented architectures
 This architecture is the latest version of call-and-return architecture.
 It consist of the bundling of data and methods.

5. Layered architectures
 The different layers are defined in the architecture. It consists of outer and inner
layer.
 The components of outer layer manage the user interface operations.
 Components execute the operating system interfacing at the inner layer.
 The inner layers are application layer, utility layer and the core layer.
 In many cases, It is possible that more than one pattern is suitable and the
alternate architectural style can be designed and evaluated.

14. (a) Consider the following program segment


/*num is the number the function searches in a presorted integer array
arr*/
int bin_search (int num)
{
int min, amin=0; max = 100;
while (min max)
if (ar(min + max)2] > num)
MAX(min+max);
else if(min max)/2]
in = (min-max) 2:
else return (min + max)/2):
}
return(-1);
}
i)Draw the control flow graph for this program segment.
ii) Define cyclomatic complexity.
iii) Determine the cyclomatic complexity for this program. (Show the
Intermediate steps in your computation. Writing only the final result is
not sufficient)
Solution :
i) We will number the program statements as follows
int bin_search (int num)
{
1) int min, max; min = 0; max = 100;
2) while (min! = max)
3) if (arr[min + max]/2) > num
4) max = (min + max) /2;
5) else if (arr[(min + max)/2]
6) min = (min + max)/2;
7) else return ((min + max)/2);
8) }
9) return (- 1);
}
The Control Flow Graph(CFG) is as follows
ii) Cyclomatic complexity :
The cyclomatic complexity is defined as the number of
independent paths in the basis set of programs that provides the
b) (i) upper bound for the number of tests that must be conducted to
ensure that all the statements have been executed atleast once.
iii) Cyclomatic complexity= E – N + 2 = 14 – 9 + 2 = 7
Total number of regions = 7
OR
Explain equivalence partitioning technique with suitable example.
Equivalence Partitioning:
 It is a black box technique that divides the input domain into classes of data.
From this data test cases can be derived.
 An ideal test case uncovers a class of errors that might require many arbitrary
test cases to be executed before a general error is observed.
 In equivalence partitioning the equivalence classes are evaluated for given
input condition. Equivalence class represents a set of valid or invalid states for
input conditions.

Example:
Design the black-box test suit for the following program. The program computes
the intersection point of two straight lines and displays the result. It reads two
integer pairs (m1 , c1 ) and (m2 , c2 ) defining the two straight lines of the form y'
= mx + c.
Solution :
The equivalence classes for given program are as follows
1) Parallel lines if m1 = m2, c1  c2
2) Intersecting lines if m1  m2
(ii) 3) Coincident lines if m1 = m2, c1 = c2
The representative values can be selected from each equivalence class. Thus the
test suit obtained can be
(5, 5) (5, 7)
(7, 10) (8, 12)
(15, 15) (15, 15)

Write Short notes on: Regression Testing.


Regression Testing
 Regression testing is used to check for defects propagated to other modules by
changes made to existing program. Thus regression testing is used to reduce the
side effects of the changes.
 There are three different classes of test cases involved in regression testing –
 Representative sample of existing test cases is used to exercise all software
functions.
 Additional test cases focusing software functions likely to be affected by the
change.
 Tests cases that focus on the changed software components.
 After product had been deployed, regression testing would be necessary because
after a change has been made to the product an error that can be discovered and it
should be corrected. Similarly for deployed product addition of new feature may be
requested and implemented. For that reason regression testing is essential.
15. (a) Explain the various steps involved in risk management. [13]

Risk Management
A software project can be concerned with a large variety of risks. In order to be adept to
systematically identify the significant risks which might affect a software project, it is
essential to classify risks into different classes. The project manager can then check
which risks from each class are relevant to the project.
There are three main classifications of risks which can affect a software project:
1. Project risks
2. Technical risks
3. Business risks
Risk Assessment
The objective of risk assessment is to division the risks in the condition of their loss,
causing potential. For risk assessment, first, every risk should be rated in two methods:
o The possibility of a risk coming true (denoted as r).
o The consequence of the issues relates to that risk (denoted as s).
Based on these two methods, the priority of each risk can be estimated:
p=r*s
1. Risk Identification: The project organizer needs to anticipate the risk
in the project as early as possible so that the impact of risk can be
reduced by making effective risk management planning.
A project can be of use by a large variety of risk. To identify the significant risk, this
might affect a project. It is necessary to categories into the different risk of classes.
2. Risk Analysis: During the risk analysis process, you have to consider
every identified risk and make a perception of the probability and
seriousness of that risk.
There is no simple way to do this. You have to rely on your perception and experience
of previous projects and the problems that arise in them.

Risk Control
It is the process of managing risks to achieve desired outcomes. After all, the identified
risks of a plan are determined; the project must be made to include the most harmful and
the most likely risks. Different risks need different containment methods.
1. Risk planning: The risk planning method considers each of the key risks that
have been identified and develop ways to maintain these risks.

2. Risk Monitoring: Risk monitoring is the method king that your assumption
about the product, process, and business risks has not changed.
OR

Discuss about COCOMO II model for software estimation.


(b) (i)
COCOMO II Model
COCOMO II is applied for modern software development practices addressed for
the projects in 1990’s and 2000’s.
The sub-models of COCOMO II model are –
1. Application composition model
 For estimating the efforts required for the prototyping projects and the
projects in which the existing software components are used application-
composition model is introduced.
 The estimation in this model is based on the number of application points.
The application points are similar to the object points.
 This estimation is based on the level of difficulty of object points.
2. An early design model
 This model is used in the early stage of the project development. That is
after gathering the user requirements and before the project development actually
starts, this model is used. Hence approximate cost estimation can be made in this
model.
 The estimation can be made based on the functional points.  In early stage of
development different ways of implementing user requirements can be estimated.
 The effort estimation (in terms of person month) in this model can be made
using the following formula :
Effort = A  sizeB  M
3. A reuse model
 This model considers the systems that have significant amount of code
which is reused from the earlier software systems. The estimation made in
reuse model is nothing but the efforts required to integrated the reused
models into the new systems.
 There are two types of reusable codes : black box code and white box
code. The black box code is a kind of code which is simply integrated with
the new system without modifying it. The white box code is a kind of code
that has to be modified to some extent before integrating it with the new
system, and then only it can work correctly.
4. Post architecture model
 This model is a detailed model used to compute the efforts. The basic
formula used in this model is
Effort = A  SizeB M
 In this model efforts should be estimated more accurately. In the above
formula A is the amount of code

An application has the following : 10 low external inputs, 8 high


(ii) external outputs, 13 low internal logical files, 17 high external interface
files, 11 average external inquires and complexity adjustment factor of
1.10. What are unadjusted and adjusted function point counts ?
Solution : The unadjusted function points are calculated using predefined weights
for each function type which is as given below.

The unadjusted function point (UFP)


=  Functional units × Weighting factor.
= ((10×3) + (8 × 7) + (13 × 7) + (17 × 10) + (11 × 4))
= (30 + 56 + 91 + 170 + 44)
UFP = 391
Adjusted function point (FP)
= UFP × Complexity adjustment factor
= 391 × 1.10
FP = 430.10
PART – C (1x15=15 Marks)

16. (a) Prepare a software requirement specification document for "Library [15
Management System" ]
Solution :
1. Introduction
1.1 Purpose
This document gives the detail functional and non functional requirements for Library
management system. Thee purpose of this document is that the requirements mentioned in it
should be utilized by the software developer to implement the system. This SRS will be used
by the software engineers who are constructing the system and the users who will use the
system. The hotel end users will be able to use this SRS as a test to see if the software
engineers will be constructing the system to their expectations.
1.2 Scope
The library management system will automate the major library operations. Various
subsystems will be student accounts management system, Book issuing system, Stock
maintenance systems and fine calculation and management system.
1.3 Definitions, Acronyms and Abbreviations
 LMS - Library Management System
 SRS - Software Requirement Specification
 GUI - Graphical User Interface
 Stakeholder - The person who will participate in this system. For example Student, Staff,
Librarian.
1.3 Overview
This system provides an easy solution for the students, staff and Librarian for accessing and
managing the books in the library.
3. Overall Description
The Library management system is developed for handling the activities for various users
such as Student, staff, librarian and library staff.
2.1 Product Perspective
This is a standalone system.
2.2 Hardware Interfaces
This system is placed in the Personal Computer in the library.
2.3 Software Interfaces
There are various databases in the system. These databases can be created in Oracle or
MySQL. The hotel books and Student/Staff information is maintained by the LMS. The
book database include the Title of the book, ISBN number, publisher, edition, number of
copies, price,status(Old or new). The Student/staff database will include information such
as first name, last name, address, phone number, designation(for staff) or class(for student),
name of books issued, Library Card number, expects date of book return, fine to be paid(if
any).
4. Functional Requirements
The functional requirement will define the fundamental functioning that the system
should perform. 1. The system should record all the details of the student, staff and
book. 2. The system should display the search results if the user searches for some
book or article. 3. The system should allow to select the book for issuing. 4. The
system should record the expected issue date and time of book. 5. The system should
allow the modification in the student/staff/book information without reentering the
entire information. 6. The system should allows to create an account for the new
student. 7. The system should allow to cancel the account if the student leaves the
college. 8. The system should display the availability of book or magazine. 9. The
system shall allow to assign password to the users. 10. The system should keep track of
the purchased items stock. 11. The member is allowed to reserve a book if it is
currently unavailable. 12. The system should generate daily or monthly report for the
stock.13. The system should allow addition of book/magazine records if new books are
purchased. 14. The system should allow deletion of book/magazine records if the
books are old and in poor condition.
4. Interface Requirements
4.1 GUI
GUI 1 : The login screen will be displayed so that the stakeholder of the system will
enter the user name and password.
GUI 2 : The main menu will be displayed for Create Account, Search, Issue/Return
Book, Book maintenance and Report generation.
GUI 2 : When the Create Account button is clicked then the form will be displayed.
This form will allow the user to enter the Student/Staff details such as last name, first
name, phone number, class and so on.
GUI 3 : If the user selects for the Search then the user will be allowed to search for the
desired book.
4.2 Hardware Interface
The system should be embedded in the Computers in the library.
4.3 Software Interface
The system must be interfaced with Oracle or Access database.
5. Performance Requirements
The performance requirement defines the response time for system functionality. The
load time for the GUI should not be more than four seconds. The log in must be
verified within 7 seconds. The search query should be processed with in 3 seconds and
response must be given.
6. Design Constraints
The system must be designed as a standalone system and must be run on window based
system. The system can be developed in Java or Visual Basic. The database can be
implemented in Oracle or MySQL.
7.Other Non Functional Attributes
7.1 Security The System administrator/Librarian must provide password to log on the
system. The password can be changed by the system administrator/Librarian. The
Student should be allowed to the access the book database for searching of book.
He/She is not allowed to modify the database. The student/Staff is allowed to change
their passwords for security purpose.
7.2 Reliability The system must be reliable to prevent any unauthorized access.
7.3 Availability The system should be available during the College hours.
7.4 Maintainability There should be the facility to add/modify information about the
Books, Student and Staff.
8. Operational Scenarios
If a new students arrives in the library for membership then the librarian creates an
account; issues him the library Card, User name and password. If the student already
has an account, he searches for the desired book/magazine. If the book is available then
he makes the request to the librarian for issuing the book. The librarian issues the book
and updates the database. If the book is not available then the member reserves the
book. On availability of the book, it is issued to the customer. If the student/staff does
not return the book on the specified date then he has to pay the fine. The librarian
updates the stock and the system generates the monthly report. The old and outdated
books are removed from the library and accordingly the stock must be updated. If new
purchase is made then also librarian is allowed to update the book database.
9. Preliminary Schedule
The system must be implemented within 6 months.

OR

i) Draw the Level 0 and Level 1 data flow diagram for the following system.
ii) Identify entities in the system and draw a diagram showing the relationship
between entities.
(b) The Chocolate Vending Machine (CVM) system requirements are as
follows :
The CVM dipenses chocolates : (1) Very large Chocolates (VC) at ` 15, (2)
Large Chocolates (LC) at ` 10 and (3) a Small Chocolates (SC) at ` 5. The
vending machine only. deals in coins. The CVM gives the proper change
after the product selection is made. The CVM must check the amount
deposited by the customer. The vending machine operates in the following
Way. (A) The CVM remains idle until a customer or owner begins to
interact with the machine. When a selection button is pressed the VCM
indicates the required amount (` 15/-, ` 10/-, ` 5). (B) If the full amount
needed has been deposited then dispense the proper chocolate and display :
Thank You! (C) If an insufficient amount (possibly zero) has been
deposited then display : remaining amount needed. (D) If an over amount
has been deposited them dispense the proper candy and change arid
display : Thank You!
Solution:

You might also like