Chat with us, powered by LiveChat ALGORITHM | Writedemy

ALGORITHM

ALGORITHM

algorithm

SIT105 Critical Thinking and Problem Solving
Assignment 2 (Worth 15% of the total marks)
Due: 8:30am, Monday 15
th
September 2014

Goals of the Assignment
 Fully understand the basic concepts behind programming.
 Take a methodical approach to solving problems.
 Develop the ability to develop algorithms using modules, cohesion and coupling.

Submission Instructions & Late Submission Penalty Information
 Print your assignment and MIBT assignment coversheet.
 The coversheet should be filled and stapled along with the assignment.
 You need to submit your assignment online on (or before) the due date
 You also need to submit a hardcopy of your assignment to your lecturer either in person or
you can drop off the hardcopy in the mailbox located on building LA, Level 4.
 The mailbox number is D6 and you will see lecturers name on the mailbox. Make sure that
you are dropping the assignment in the right mailbox. Check with the MIBT Reception if you
have trouble locating it.
 Any assignment submitted after the due date and time, will be penalized according to the
penalty rules.

Assignment Instructions
 If you are starting to work on this assignment well ahead, make sure you read the
marking criteria to fully understand what is expected out of the assignment. Also, before
you start, have a chat with your lecturer to clarify things.
 Total Marks for this assignment is 45. It is worth 15% towards your final grade.
 Read carefully the marking criteria and make sure your answers meet all the criteria.
 Answer all four questions. Write your answers in MS Word document.

Questions
1. Draw an IPO Chart (defining diagram) for the following problem statement
Design an algorithm that will prompt for and receive the time expressed in 24 hour
format (ex: 15:45), convert it to 12 hour format (ex: 03:45 PM) and display the new time to
the screen. The program should repeat the processing until the time entered is 99:99. Any
other invalid numbers (ex: 27:65), the program should display an appropriate error
message. When the program is exiting, it should also display how many times the
program was successfully run before exiting. Ex: If I ran the program 5 times with valid

2

time, before entering 99:99 then then program should display, “You ran the program 5
times”.
[10 marks]

2. Draw a Hierarchy Chart for the following problem statement.
A program produces a reorder list of products from a product inventory file. Each
product record contains the item number, the quantity on hand for the item, the quantity
on reorder, the minimum inventory level for that item, and an obsolete code (X if the
item is obsolete, blank if it is not).

The program reads the product file and determines which items are to be reordered. An
item is to be reordered if it is not obsolete and if the quantity of the item currently on
hand plus the amount on order is less than its minimum inventory level. The program
prints a detail line for each item to be reordered listing the item number, quantity on
hand, quantity on order and minimum inventory level. Print headings and column
headings at the top of each page and at the end of the report the program prints the total
number of items to be reordered.

[10 marks]

3. Write an algorithm for the following problem statement
You need write a times table program. The program should prompt and accept a number
for which the times table is to be output. The number cannot be zero or negative. The
program should also accept another number up to which the times table is to be printed.
This number can also not be negative or zero. For example if the user inputs 5 for the first
number and 12 for the next number, the program should print a times table like:
5 x 1 = 5
5 x 2 = 10
5 x 3 = 15
5 x 4 = 20


5 x 12 = 60

[10 marks]

3

4. You are expected to use modularisation techniques to write this algorithm.
Design an algorithm that will process the weekly employee time cards for all the
employees of an organization. The employee data is stored in a file employee.txt with the
following fields:
 Employee Number
 Employee Name
 Hourly wage rate
 Number of hours worked

The following validations have to be performed:
 Employee name and number cannot be blank
 Hourly rate cannot be less than $20 which is the minimum wage.
 Hours worked cannot be negative.

The following calculations have to be performed:
 If hours worked is more than 35, then the overtime pay is calculated as time-and-half for the hours exceeding 35.
 A tax amount of 20% is to be calculated and deducted.

The output should display the following in a neatly formatted manner:
 All fields from the data file
 Overtime pay
 Gross pay (before tax)
 Tax Amount
 Net amount (after tax)
 Total payroll amount for the month and average amount paid.

Use modules. Do NOT write a single program.
[15 marks]

🙂

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order