Programming Methods Stationery Shop Information Technology Essay

The assignment allows the candidate to demonstrate the ability to use various modeling methods and techniques when developing computer programs.

This assignment is based on the analysis and design of a computerized stock control system for a stationery shop that sells a variety of paper, folders, envelopes, printer cartridges, pens, etc.

The Scenario

The stationery shop requires a computerized record system for the monitoring and ordering of stock. The current system is a manual system for purchases made and for monitoring stock levels and determining when to order new stock and how much to order.

Customers who wish to pay by debit card, credit card or cheque must register with the store. Many customers opt to pay by cash and not give their details to the store.

It is hoped that the computerized system will ensure the sufficient stock levels are maintained for all items in the store. The generation of reports will allow the manager to target the marketing of products to specific customers based on their previous purchases (for example small businesses may order printer cartridges and paper in bulk) and keep a close check on the financial performance of the shop.

The manager will have overall control of the system but the sales staff will be responsible for updating all records as new customers are added, as customers make new purchases, and as new stock is delivered. The sales staff will require access to view customer records and stock records in order to check details of specific customers and stock items. The manager will want regular reports of total items bought in each monthly by stock item, and also the total stock in the shop at any time.

Task 1

The shop manager requires the following reports:

A few entities have been designed for the use of the office and updates. They will be useful for the reports asked.

*

In case of iteration, this blank box with a * will b used to represent it.

SUPPLIER FIELD

Number

Name

Address

ITEM FIELD

Number

Item

Category

Stock_Quantity

CUSTOMER FIELD

Number

Name

Surname

D.O.B

ID_Card

Address

Phone_Number

PURCHASE BODY

Item

Quantity

Amount

PURCHASE HEADER

Date

Purchased_Number

Customer_Name

Customer_Surname

Report 1 A monthly list for the total number of items purchased, by stock item, listing number sold, and purchase price and total payment received for each stock item.

The table with all the changes that needs to be done will be represented as follows:

Details

Customer

Item

Purchase Body

Purchase Header

Supplier

Customer

Item

Purchase

The Physical Data Structure

*

Stock_Item / Date / Purchase_No / Amount_Paid

*

Customer

*

Customer Group

†©¬¥€ ‚¯¤¹

Stationery Shop Purchase File

This is the physical data structure representing that the customer s have been groups as there were several purchases by different customers, all of them buying and paying differently.

The representation of the logical data structure

*

Stock_Item / Date / Purchase_No / Amount_Paid

*

Customer

File Body

Stationery Shop Purchase File

The Preliminary Program Structure

Print a line on the report

Customer Number

Close Files

Print Footer

Open All Files

Print Heading

*

Process Records for Customer Number

Closing

Processing

Initializing

Stationery Shop Purchase Report Program

Accumulate by date total stock item purchase

*

Add individual amount paid by Item, Purchase _Number

The box Accumulate by date, total stock item, and purchase indicates that these fields have been grouped by Customer_Number followed by Purchased_Number then by Stock_Item. A subtotal is will be placed at each change of the Customer_Number. Thus resulting in the Total Amount_Paid by Stock_Item, and the purchase done by Purchase_Number.

Report 2 A list of the total stock in the shop, by item stock, listing item stock, and the number in the shop. This list can be generated at any time for stocktaking process.

The logical data structure

*

Stock_Item list

*

Number in the shop

*

Number_Sold by Stock_Item

*

Stock_Item shared in categories

Footer

Report Body

Heading

Stationery Shop Stock Report

The preliminary program structure

*

Number Delivered By Supplier

*

Number Sold

Print Header

List Stock Item

Accumulate Total Amount

Close all

Print Footer

Process Stock for Item

Print Header

Open all files

Closing

Processing

Initializing

Stationery Shop Stock

Task 2

Write the pseudocode for both reports.

The pseudocode for report 1

Start Program

USE variables Stock_Item, Category OF TYPE Character

Month_Number, Number_Sold, Purchase_Price, Cash_Received, Total_Cash_Received OF TYPE Integer

DISPLAY “Enter Month Number”

ACCEPT “Month_Number”

IF Month_Number = “Number” ***Comments (month number is input, where number is 1 – 12 months)

THEN Cash_Received = select (Number_Sold * Purchase_Price)

From Stock_Item according to Month_Number.

Total_Cash_Received = Add Cash_Received from Stock_Item group.

END IF

DISPLAY “Cash_Received”

DISPLAY “Total_Cash_Received”

End Program

Pseudocode for report 2

Start Program

USE variables Stock_Item, Category OF TYPE Character

Stock_Number, Number_Sold, Number_Unsold, Number_Delivered, Total_Stock_Number OF TYPE Integer

DISPLAY “Enter Stock_Number”

ACCEPT “Stock_Number”

IF Stock_Number = “Number”

THEN Stock_Unsold = select (Stock_Number – Stock_Sold)

Stock_Delivered = select (Number_Delivered)

Total_Stock = select (Stock_Unsold + Number_Delivered)

END IF

DISPLAY “Total_Stock”

End Program

(b) Draw a flowchart for both reports.

(i) Flowchart diagram for report 1

Start Program

Input Month_Number

If Month_Number = 1 <= num <= 12

NO

YES

Process: Cash_Received = select (Number_Sold * Purchase_Price)

Display: Cash_Received

Process: Total_Cash_Received = Add all Cash_Received from Stock_Item

Display: Total_Cash_Received

End Process

Start ProgramFlowchart diagram for Report 2

End Process

Display: Stock_Unsold

Process: Total_Stock = select (Stock_Unsold + Number_Delivered)

Display: Stock_Delivered

Process: Stock_Delivered = select (Number_Delivered)

Process: Stock_Unsold = select (Stock_Number – Stock_Sold?

If Stock_Number = Valid

Input Stock_Number

NO

YES

Task 3

Write a pseudocode for the main menu.

Start program

Use variables Access_Level OF TYPE Integer

Username, Password OF TYPE Character

Display “System Entry Screen”

Accept “Username and Password entered”

Do Case of Access_Level

Case Access_Level = 1

Access to all menus

Case Access_Level = 2

Access to menu, Print Disabled

End Case

If Username and Password invalid

Then message on screen “Username and Password Invalid”

End If

Display “Username and Password Invalid”

If Username and Password = Valid

Then Access_Level = Check for User Login

If Access_Level = 1

Then Screen = display Full Access of Main Menu

Else

Screen = Show Print Report Disabled

End If

End If

Display “Main menu Screen”

End Program

Draw a flowchart for the main menu.

Start Program

Screen Input

Username and Password

Check

If Username and Password is OK

Username and Password is Invalid

NO

YES

Process: If Username and Password is OK, Then Check Access_Level

-Level

If Access_Level = OK, Then 1 = YES, 2= NO

Display:

Screen with Print Report Disabled

NO

YES

Display: Screen with all Access

End Program

Using appropriate test data, test the pseudocode written in task 3a) by producing test plans, check desks and dry runs.

A test plan studies the strategy in order to ensure that all requirements and specifications are met. It also helps to predict the scope, approach, resources and schedule of the testing activities like to identify the items and features to be tested, testing tasks that will be performed, the person responsible for each task and the risks that might develop with this plan.

The test plans consist of the following exercises:

Test plan identifier

Introduction

Test items

Features to be tested and not to be tested

Item fail and pass

Resumption requirements

Test deliverables

Testing tasks

Environmental needs

Responsibilities

Training implementation

Schedule

Risks

Approvals

Test plan identifier

Specify the only identifier assigned for this test plan.

Introduction

Group all the software items and features to be tested and all the details of these items must be included.

This can be classified as a multilevel test plan. In which, each lower-level test plan must refer to the higher-level test plan.

Test items

Task 6

In no more than 500 words, write a review of your work. Describe any assumptions you have made, any weaknesses in your work and any changes you could introduce to improve your work. For the different methods and techniques you have used or described in tasks 1-5, suggest which methods would be appropriate for different programming languages.

In short, this assignment gives a new range on modeling techniques of a stationary shop. It may be difficult to write the pseudocodes but it s easy enough to be understood. It brings efficiency, brings a rise in sales and therefore brings a positive change in the company’s profit.

The techniques used earlier in this assignment are listed below:

Data Structure Diagrams

Logical Data Structures

Program Structure Diagrams

Flowcharts

Class Diagrams

The techniques mentioned above have their specific roles for explaining and describing the methods to merge the company with newer technology.

Data Structure Diagrams

The DSDs are diagrams which help to understand what exactly is being done. They are simple and give a clear idea of the structure. These diagrams are important for the manager in order to reorganize his staffs.

Logical Data Structure

The LSDs are diagrams which show how to gain access and represent the data.

Program Structure Diagrams

PSDs are diagrams demonstrating the works of the system and to create a relationship between the parts of the whole system.

Flowcharts

Flowcharts are diagrams that show the steps in diagrams and in the exact order. Flowcharts are joined by arrows indicating what follows after a step.

Class Diagrams

These diagrams describe the structure of the system by showing the system’s classes, attributes, and relationships between the classes.

Assumptions made for this assignment.

Security must be tighter for the database access.

Customers are assumed to be regular.

A set of logins must be created for the access of different staffs while accessing parts of the database.

A secret login must be created for the manager ONLY for him to gain complete access of the database.

Changes in the database must be done by the manager or the staffs responsible for the database.

Prints are done only by the manager.

The manager should keep track of the records regularly.

Improvements for the tasks.

The system must be designed in a way so as the customer knows that he is free to buy any stationary he wishes wherever he wants.

There should be someone else to replace the manager in case he is not available. So this implies that there should be someone else to take over when the manager is not here.

Stock ordering and checking is going on well. But since the business is growing, there should be specific people for each task.

There should be another database for the sale of stationery to people who are not regular, to balance the stock list at the end of months and to balance the profit of the sell.