0% found this document useful (0 votes)
25 views7 pages

FOC Ab

This document outlines the assignment brief for a course on Fundamentals of Computing, detailing the structure, requirements, and deadlines for two parts of the assignment. Part A consists of an in-class exam, while Part B requires the submission of a C program addressing various tasks related to a scenario called 'SMART COURIER TOOLKIT'. The document also specifies learning outcomes, assessment criteria, and guidelines for submission, including strict adherence to formatting and plagiarism policies.

Uploaded by

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

FOC Ab

This document outlines the assignment brief for a course on Fundamentals of Computing, detailing the structure, requirements, and deadlines for two parts of the assignment. Part A consists of an in-class exam, while Part B requires the submission of a C program addressing various tasks related to a scenario called 'SMART COURIER TOOLKIT'. The document also specifies learning outcomes, assessment criteria, and guidelines for submission, including strict adherence to formatting and plagiarism policies.

Uploaded by

ahmadforgames16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ASSIGNMENT BRIEF

HTU Course No: HTU Course Name:


40303130 Fundamentals of Computing
BTEC Unit Code: BTEC UNIT Name:

SCH-01-03, Rev.1.0
Student Name/ID Number/Section
HTU Course Number and Title 40303130 Fundamentals of Computing
BTEC Unit Code and Title
Academic Year 2025-2026 1
Assignment Author Ashraf Alsmadi
Reem Elyyan - Elham Derbas - Eyad Taqieddin -
Ashar Alkhamaiseh - Ashraf Alsmadi - Weaam
Course Tutor Alrbeiqi - Mariam Biltawi - Shatha Alhawawsha -
Rawaah Qoraan
Assignment Title Assignment 1
Assignment Ref No 1
Issue Date 29/11/2025
Formative Assessment dates From 29/11/2025 to 15/01/2026
Submission Date 17/01/2026
IV Name & Date Mohammad Yahia 28/11/2025
Submission Format
The assignment is divided into two parts, and each part should be submitted on the specific date that is
shown below, each student should submit his work individually.
Part A:
An in-class closed book and closed notes examination, this part will be held on 2/12/2026
Part B:
A full working source code for all activities, the code should be implemented using C language. Oral
discussion with your instructor (and any other witness) about the submitted work.
A signed declaration form.
The submission deadline of this part will be on Saturday 17/JAN/2026 at 11:59 PM.
Soft-copy submissions are only allowed, you are required to upload your submission files to
Deeplycode platform within the submission date and time stated above.
NO SUBMISSION by EMAIL and NO LATE SUBMISSIONS WILL BE ACCEPTED.
If you commit any kind of plagiarism, HTU policies and regulations will be applied.
The oral discussion will be scheduled by your instructor after the assignment deadline.
The attendance of the oral discussion is mandatory in the date and time determined by your instructor, the
exact discussion schedule will be announced after your submission, and you need to be ready to record the
oral through Microsoft Teams from the beginning of the discussion.
Unit Learning Outcomes
LO1 Implement full programs in C that employ input/output statements, and three kinds of control structures:
sequence, selection, and repetition.
LO2 Use and build functions to abstract C programs and reuse code where possible.
LO3 Use one-dimensional and two-dimensional arrays effectively to represent data and solve real-life
problems.
Assignment Brief and Guidance
Part A. (Inclass Exam)
Closed book/notes exam, delivered in Safe Exam Browser.
SCH-01-03, Rev.1.0
Part B. Scenario SMART COURIER TOOLKIT
1.1 SwiftShip, a same-day delivery company, needs one compact C program that performs several small
operations tasks. The grading platform supplies one activity per run as input and expects exact output with no
prompts, menus, or extra text.
1.2 Submit one .c to deeplycode platform that:
reads the first integer activity(values 1..5) to select the task,
implements the named functions for each activity and calls them from main,
prints output exactly as specified for that activity (labels, spacing, decimals),
uses standard input/output only.
2. Activity Selector (applies to all runs)
2.1 The first integer in the input is activity.
2.2 After reading activity, read the rest of the input according to that activity format.
2.3 Do not print prompts, menus, or decorative text.

3. Activity 1 — Parcel Box Sizing and Box Count (uses built-in math)
3.1 Goal:
Compute the space diagonal (cm) of a parcel given width, height, depth (cm).
Compute the minimum number of boxes for a shipment given total weight and per-box capacity (kg),
using the mathematical ceiling.
3.2 Functions to implement and use:
double box_diagonal(double w, double h, double d);
the function must compute square root of (w*w + h*h + d*d)
int boxes_needed(double totalWeightKg, double capacityKg);
the function must compute ceiling of (totalWeightKg / capacityKg)
3.3 Input format (after Activity=1):
Line 1: w h d (three positive real numbers; centimeters)
Line 2: totalWeightKg capacityKg (two positive real numbers; kilograms)
3.4 Output format (single line):
DIAG=<value_cm_2dp> BOXES=<integer>
(Print DIAG with exactly two decimals.)
3.5 Example:
Example Input:
1
30 20 10
47.8 5
Example Output:
DIAG=37.42 BOXES=10
3.6 Notes and edge cases:
Exact multiples produce an integer box count.
Inputs are positive; no zero/negative values; if input is invalid print “invalid input”

4. Activity 2 Sensor Statistics on a 1D Array (median and mean)


4.1 Goal: From N integer readings, compute (a) the median as an integer and (b) the mean to two decimals.
SCH-01-03, Rev.1.0
4.2 Functions to implement and use:
int median_of(int a[], int n); // sort ascending, then pick median
double mean_of(int a[], int n); // sum as double / n
4.3 Median rule:
If n is odd: middle element after sorting.
If n is even: take the lower of the two middle elements (index n/2 - 1).
4.4 Input format (after Activity=2):
Line 1: N
Line 2: x1 x2 ... xN (1 <= N <= 1000)
4.5 Processing requirements:
You may use qsort from <stdlib.h> or any correct sort.
4.6 Output format (single line):
MEDIAN=<int> MEAN=<value_2dp>
4.7 Example:
Example Input:
2
5
10 3 8 3 9
Example Output:
MEDIAN=8 MEAN=6.60
4.8 Notes and edge cases:
Preserve the “lower middle” rule for even N.
Print the mean with exactly two decimals.
5. Activity 3 Branch Inventory Aggregation
5.1 Goal: Two branches counted the same list of SKUs in the same order. Produce the element-wise sum
across the two lists.
5.2 Function to implement and use:
void add_vectors(int a[],int b[], int n, int out[]); // out[i] = a[i] + b[i]
5.3 Input format (after Activity=3):
Line 1: n
Line 2: a1 a2 ... an
Line 3: b1 b2 ... bn
(1 <= n >= 1000)
5.4 Processing requirements:
Treat the two lines as equal-length vectors of size n.
For each index i, compute out[i] = a[i] + b[i].
Arrays must be passed as parameters; scan them in main.
5.5 Output format (single line):
v1 v2 ... vn

5.6 Example:
Example Input:
SCH-01-03, Rev.1.0
3
4
2075
3168
(First line 3 is the activity; second line 4 is n.)
Example Output:
5 1 13 13
6. Activity 4 — SKU Text Normalization and Character Counts (strings as char[])
6.1 Goal: Given a single text line describing a product, report counts from the original text and produce a
normalized variant for indexing.
6.2 What to compute:
Counts on the original text: number of letters, digits.
A normalized version that:
a) converts letters to uppercase,
b) replaces digits 0..9 with *,
6.3 Functions to implement and use:
int count_letters(char s[]);
int count_digits(char s[]);
void normalize_sku(char in[], char out[]); // uppercase, digit to *
6.4 Input format (after activity=4):
Line 2: a single line of text (product description), which may contain letters, digits, and punctuation.
6.5 Processing requirements:
Use <ctype.h>: isalpha, isdigit, toupper.
Preserve punctuation such as - / _ . unchanged.
6.6 Output format (two lines):
Line 1: L=<letters> D=<digits>
Line 2: NORM=<normalized_text>
6.7 Example:
Example Input (tokens):
4
aB12z-9
Example Output:
L=3 D=3
NORM=AB**Z-*
Explanation: letters to uppercase; digits to *.
7. Activity 5 Shelf Map Summaries
7.1 Goal: An R × C grid of non-negative integers stores quantities per shelf slot. Report:
each row sum,
each column sum,
the total number of non-empty slots (cells with value > 0).
7.2 Function to implement and use:
void row_col_summaries(int R, int C, int grid[][C]);
SCH-01-03, Rev.1.0
7.3 Input format (after Activity=5):
Line 1: R C
Lines 2..(R+1): each contains C integers for one grid row
(1 <= R, C <= 100; 0 <= cell <= 1,000,000)
7.4 Output format:
Line 1: ROWSUM K1 K2 ... KR
Line 2: COLSUM L1 L2 ... LC
Line 3: NONEMPTY=<count>
7.5 Example:
Example Input:
5
34
1032
0005
4100
(First line 5 is the activity; next line 3 4 is R C; then 3 rows.)
Example Output:
ROWSUM 6 5 5
COLSUM 5 1 3 7
NONEMPTY=6
8. Global Rules and Notes
8.1 The first integer read selects the activity; do not print menus, prompts, or extra text.
8.2 Outputs must match required labels, capitalization, spacing, and number formatting exactly.
8.3 Arrays must be passed to functions as parameters.
8.4 Keep everything in a single .c file.

SCH-01-03, Rev.1.0
Learning Outcomes and Assessment Criteria
Learning Outcome Pass Merit Distinction
P1 Write a program that
accept input from users,
output results to users, and
correctly perform
LO1 Implement full mathematical operations.
M1 Implement programs D1 Create programs that
programs in C that employ
P2 Implement programs that repeat actions using follow the best
input/output statements,
that make decisions based complex selection and programming practices to
and three kinds of control
on selection statements repetition statements. solve real-life problems.
structures: sequence,
selection, and repetition.
P3 Implement programs
that repeat actions using
basic repetition
statements.

P4 Use built-in functions


by calling them, passing
the appropriate
LO2 Use and build parameters, and handling
M2 Build functions that
functions to abstract C the expected return values.
accept arrays as
programs and reuse code parameters.
P5 Build user-defined
where possible.
functions, determine their
appropriate parameters,
and return types.

P6 Develop programs that M3 Develop programs D2 Create programs that


LO3 Use one-dimensional
use one-dimensional that define strings as an use two-dimensional
and two-dimensional
arrays to solve problems array of characters and arrays to solve problems
arrays effectively to
that deal with one- process their elements that deal with two-
represent data and solve
dimensional data. through repetition. dimensional data.
real-life problems.

SCH-01-03, Rev.1.0

You might also like