INF2011 2019FinalExam
INF2011 2019FinalExam
INF2011 2019FinalExam
-----------------------------------------------------------------------------------------------------------
Instructions to Candidates
-------------------------------------------------------------------------------------------------------
Page 1 of 14
1.1 Which objects may send queries back to the boundary objects to get more information
from the actors?
a) database
b) controllers
c) boundary
d) data access
a) StudentListingForm is a class
b) ListingForm is a class whose constructor requires a parameter
c) studentController is of type StudentListingForm
d) the code initialises the studentController
1.4 To make the new form a child form, you would use:
a) this = child.MdiParent;
b) MdiParent.child = this;
c) new = child.MdiParent ;
d) child.MdiParent = this;
1.5 If you want to initialize an object dynamically with user given values then:
a) you need to use the default constructor.
b) you need to use the parameterized constructor.
c) implement a class that will achieve this and call the class in the property
methods region
d) all of the above are correct
Page 2 of 14
1.7 __________is the process of creating products that provide meaningful and relevant
experiences to users.
a) wireframing
b) use case analysis
c) user interface design
d) user experience (ux) design (uxd)
1.8 In a layered architecture, the __________ layer refers to the characteristic of state
that outlives the process that created it.
a) database
b) presentation
c) persistence
d) business
1.9 A(n) __________ is a procedure in your code that determines what actions are
performed when an event occurs
a) region
b) collection
c) event handler
d) method
1.11 A ________ is used to retrieve data from a data source and populate tables
within a DataSet.
a) dataset
b) dataprovider
c) datareader
d) dataadapter
Page 3 of 14
1.13 Which of the following focuses on what information is presented to the user
a) controller classes
b) boundary classes
c) data access classes
d) dataprovider classes
1.16 Which of the following does not feature in a detailed sequence diagram?
a) actors
b) objects
c) lifelines
d) forms
Page 4 of 14
1.20 You can use the ________ event to perform operations such as updating the
data displayed in the controls of the form when the form is triggered
a) activated
b) load
c) closed
d) show
Page 5 of 14
// Statements to Execute
a) tests the condition of the collection object and then then executes the
statements
b) is the syntax of defining the collection object in c# programming language
c) execute the block of statements for each element in the array var_name
d) is a loop with collection object and a required variable name to access
elements from the collection object.
1.25 To check if the form studentForm does not exists, you would use the code
snippet:
a) if (studentForm = null)
b) if (studentForm == null)
c) if (studentForm:null)
d) if (studentForm >= null)
c)
<access_modifier> Collection <derived_class_name> : <base_class_name>
{
// Derived class implementation
}
d)
<access_modifier> class <derived_class_name> : <base_class_name>
{
// Derived class implementation
}
Page 7 of 14
Page 8 of 14
CRUD SQL
1
2
3
4
Table 1: CRUD operations and associated SQL commands
b. When we are building APIs, we want our models to provide the four CRUD
functionalities. Identify AND explain at least two benefits of CRUD operations
[4]
c. Identify at least two of the most important ADO.NET objects that are responsible for
the CRUD operations [2]
Page 9 of 14
1. Explain Design in one sentence (underline the three key concepts) to Bongani. [3]
2. Pharmacare need reports from the eCommerce website. Based on the case describe
a. The content and objectives of a report
b. The type of report
c. The intended audience (stakeholders) and
d. The benefits for the intended audience. [4]
3. The five steps of the Stanford Design Thinking process are, Empathize, Define, Ideate,
Prototype and Test. Explain how each step could be used at Pharmacare to improve the
ordering system. Please be as specific to Pharmacare as possible. [5]
4. The first questions to ask regarding testing is What to test? Answer this question for the
Pharmacare eCommerce website. [5]
5. Which Project Management method should Pharmacare follow (Waterfall or Agile) to develop
the new eCommerce website? Justify your answer. [5]
7. Design the screens for the “online purchasing option” on the Pharmacare website. Assume
the customer has logged on. Pay special attention to the business rules/ functional
requirements specified in the case study. [10]
Page 10 of 14
b. Add to the iteration (Figure 1), information about the customer who makes an order
[10].
9. Using GRASP principles:
a. Identify class(es) in Figure 1 that would be ideal candidate(s) for creating instances of
the Item class? Motivate your answer. [2]
b. What is the benefit of using the principle used in question 9(a)? [2]
10. A new order has a status of “pending”. While in pending status, an order can be cancelled
which will change its status to “cancelled”. Assuming an order can be in the following states:
unknown, pending, shipped, delivering, and cancelled, answer the following questions.
a. Class Order has a field status which captures the different states of an order. Write the
code that would allow status to reflect these different states. [5]
b. Properties in C# combine aspects of both fields and methods. To the user of an object,
a property appears to be a field. To the implementer of a class, a property is one or two
code blocks – in the first block, executed when the property is read; and in another
block, executed when the property is assigned a new value.Create a read-only property
for the field defined in question 10(a). [4]
c. There are three main Object-Oriented Principles used in systems development. Which
of these principles do you think is portrayed in question 10(a-b), and what are the
benefits of this principle towards systems design and implementation? [6]
Page 11 of 14
a. Write the code in the ProductDB class to declare a collection of products. Assume that
this is the first time a collection is being declared in the class. [6]
b. Write the code for the constructor of the ProductDB class and create an instance of
the products collection in the constructor [4]
c. The ProductDB class has a void method DatabaseAdd which tries to fulfil one of the
CRUD functionalities – inserting data into the database. The method has tempProduct
as a parameter/variable of type Product. The body of the method, builds a SQL
statement that will be used to insert the data into the Product Table when the
UpdateDataSource method is called. A snapshot of the current method is shown below.
It has some errors and it is not complete. Correct the errors in the program.
[5]
public void DatabaseAdd()
{
decimal SQLInsert = "";
SQLInsert = "INSERT into Table()" +
"VALUES (" + GetValueString(tempProduct) + ")";
UpdateDataSource(new SqlCommand(SQLInsert, cnMain));
return SQLInsert;
}
d. To ensure that a layered approach is followed; explain and show how the presentation
layer communicates with the ProductDB class to access the DatabaseAdd method
[10]
Page 12 of 14
Pharmacare.
Imagine you are the IT manager for a pharmaceutical distribution company Pharmacare, of between 50 – 100 employees in
each division across the country. Pharmacare does not sell to the general public, rather Pharmacare sells only to Pharmacy’s.
Pharmacare supplies pharmaceuticals (such as medicines and drugs) to dispensary’s, plus an established range of medical
supplies (electronic devices such as blood pressure monitors, self-care devices such as diabetes management tools, diagnostic
tools such as Sphygmomanometers to record blood pressure), surgical supplies (bandages, gauze, gloves, needles, syringes
etc), durable medical equipment (such as walking aids and wheelchairs), as well as a range of toiletries, a range of
cosmetics and beauty products, and a range of health foods. Many of the Pharmacies Pharmacare is supplying have
suggested that online access to the stock and an online ordering facility would be advantageous, as the current ordering
system was not coping. Customer complaints include incomplete orders, stock-outs, and incorrect account balances.
The company has been successfully running for the last 10 years and has a solid customer base, but it is now one of many
pharmaceutical distribution companies and has lost its competitive edge. Bongani Sagela, the Chief Operation Officer (COO)
and very influential member of executive management, has engaged with customers and thinks the customers should be
listened to.
Bongani presented a proposal for an eCommerce project to executive management in order to get approval for the project,
as he says he wants to improve the competitiveness of the company. He received approval for the project as the executives
want Pharmacare “to enter the digital era.” Bongani has asked you to draw up a project charter as the formal authority for
the project. Bongani agrees to serve as the primary sponsor of the project and appoints you as the project manager. Bongani
sees the eCommerce project involving the creation of a company website with transaction handling capabilities for key
customers. Bongani is excited and impatient, and he wants the project to be completed within four months.
It is currently August 2019. The company has no previous experience in developing online applications using web
technologies, but they do have internet access and space on a web server. The IT Department (which you manage) supports
all the divisions across the country with a shared infrastructure. The IT Manager is expected to provide strategic leadership
for IT services surrounding initiatives and projects, and coordinate with management on systems/services to enhance
services. The IT Department has four managers, the Network manager (Network Infrastructure, Desktops, Peripherals,
Mobiles, Communications, Network traffic), Development manager (Enterprise Architects, BAs, Developers, DBAs,
Testers, QA), Operations Manager (Change Management, Release Management, Help Desk, Applications, Data Storage,
Technical Support, Ops Infrastructure, DRP), and Security Manager (Security, Risk, Privacy). The IT Manager is responsible
for hiring, training, development, compensation, and performance management of IT staff.
In addition to creating the eCommerce application, Bongani has asked you to train two sales staff to do simple website
updates. The website should have a description of the organisation, the list of services offered, contact information, graphics
and an option for online purchasing for customers. The online purchasing option will need to have protected customer
password entry, and product codes on the online form should be selected from the Oracle ERP system used by the company.
Customers should be able to view the stock status accessed from the company’s ERP system, select products and add quantity,
and online submission of customer enquiries.
The executives would like to be able to see actual verse planned top selling products over a defined period by region. The
head of the development team has presented the second iteration of their design class diagram (Figure 1) to a strategic meeting
regarding the project. The iterations are based on the CustomerOrder package of the system. This package, models part of
the entire system as follows:
Page 13 of 14
Figure 1: Iteration
Page 14 of 14