0% found this document useful (0 votes)
49 views

Report

The document describes an individual project report for a digital fundamentals course. It includes background on a unit conversion program developed by the student using user-defined functions. It provides details on the program structure and logic, shows test cases and results, and evaluates how well the requirements were fulfilled.

Uploaded by

huyle972000
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)
49 views

Report

The document describes an individual project report for a digital fundamentals course. It includes background on a unit conversion program developed by the student using user-defined functions. It provides details on the program structure and logic, shows test cases and results, and evaluates how well the requirements were fulfilled.

Uploaded by

huyle972000
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/ 8

Course code OENG1207

Course name Digital Fundamentals

Location & Campus RMIT University Vietnam - Saigon South


campus

Title of project Individual Project Report

Lecturer Dr. Alexandru C Fechete

Student name Huy Le

Student ID S3915144

Group Tuesday 10:30-12:30

Assignment due date September 06, 2022

Page numbers 8

"I declare that in submitting all work for this assessment I have read, understood and agreed to the
content and expectations of the Assessment declaration."

OENG1205 – Digital Fundamentals

Semester 2 – 2022

1
Table of Contents
Background and Design 3
Describe requirements of the program and its purpose 3
Describe, show and explain your users Defined Functions with
annotations 3
The Structure of the program (flow-charts, block diagrams, etc.) 5
Solution and Testing 6
Include a table that show the behaviour of the program 6
Include a screenshot of your program 7
Conclusion and Future Work 7
Describe how well your program has fulfilled the requirements of
the task 7
List any weakness with the way the program works and what could
be done in the future to make the program better 7
References 8

2
Background and Design

a. Describe requirements of the program and its purpose.


Students implement a unit conversion program, which was done in Project
Milestone. However, students need to upgrade the program and equations at this
stage by using users-defined functions. In addition, students must ensure that the
program is suitable for converting real numbers. For example, mass or length
conversions can't have negative numbers, choose a clearly structured conversion
type, and make sentences and numbers easy to understand.
The implementation of program coding helps users to convert data such as
temperature, length, distance and mass from imperial to metric and vice versa.

b. Describe, show and explain your users Defined Functions with annotations.

P-1: Coding system

3
P-2 & P-3: Switch Function
The program is started by giving the Command Window for the users to understand that
there are a total of 14 transformations in the program. I have created a menu panel that
allows the users to easily select the type of conversion to use, so I use the 'disp' command
to bring up the appropriate menu panel window in order of temperature conversion,
distance -length, and mass.

4
P-4: Menu displays on command windows
Nextly, I use the 'input' command to ask the users to select a conversion item, and the 'while
loop' command to check if the number of users is within the menu range, otherwise the
program throws an 'Error' ! Re-Enter another input' . Command line ‘sol =
matrixdi(t,s);’ directs the program to the switch program also known as the
calculation program named 'matrixdi.m' (P-2 & P-3). In situations one and two, I allow the
users to enter the data they wish to convert, and I do the conversion using a standard
temperature calculation. To determine whether the users submitted the proper positive
amount, I used a "if-else" loop in the remaining situations. because a mass or length
computation cannot provide a negative result. Also in lines 32-35 of P-1, I have reused the
'while-loop' function for users who want to stop conversion computations. And if you
continue, the users will be able to calculate and produce the desired results with 3-digit
decimal numbers.

c. The Structure of the program (flow-charts, block diagrams, etc.)

P-5: Algorithm

5
In the command line get the variable 't' from the users, for cases 1 and 2 the program will not check,
but will check the remaining cases the program will always check the variable 't' entered by the
users. must be greater than or equal to 0.

Solution and Testing


a. Include a table that show the behaviour of the program

Type Input Value Output Value Verified Answer

Temperature

० C➡० F 18 64.400 64.400

० F➡० C -100 -73.333 -73.3333

Length & Distance

cm➡inch 9 3.543 3.54330

inch➡cm 9.7 24.638 24.6380

m➡foot 13 42.651 42.6509

foot➡m 10.8 3.292 3.2918

km➡mile 87 54.059 54.0593

mile➡km 35.9 57.775 57.7754

Mass

gram➡ounce 194.3 6.854 6.8537

ounce➡gram 20 566.990 566.9905

kg➡lb 20 44.092 44.09246

lb➡kg 45 20.412 20.4116

tonne(met)➡ton (imp) 23.8 24.181 26.2350

ton (imp)➡tonne(met) 10326 10163.386 9367.590

b. Include a screenshot of your program


The system of programs has been presented in P-1, P-2 and P-3 with detailed steps. In
addition, P-4 is an image displayed in the command window for users to easily visualise
the conversion menu.

6
P-5: Testing number 0, on-demand data, and error figures

Conclusion and Future Work


a. Describe how well your program has fulfilled the requirements of the task.
I started the work slowly by picking up the right menu board so that it was easy for me to
create variables and choose the right functions. Plus, I had initial difficulties using the 'for-
loop' function instead of the 'while-loop' function, and then I figured it out and the job
seemed easy. I have followed each step when checking the variables entered if it is in the
menu, otherwise I will start processing step by step according to the process. Next, I started
calling and opening an additional '.m' file to use the switch function. When working with the
'matrixdi.m' file, it was very easy for me to apply the same thing to what I did on project
milestones, but this project requires the metrics to be standard. For example, the length and
weight metrics are not negative, so I applied my knowledge of using the 'if-else' command to
check the results before my program did the maths.
b. List any weakness with the way the program works and what could be done in the
future to make the program better.
Even though I have complete programs, the chapter running Matlab on the website
(https://matlab.mathworks.com) occasionally displays an error. I believe this would be more
comfortable if I used Matlab software rather than Matlab online, but the system does not
permit me access due to licensing issues. The programs will be shorter, simpler, and easier to
use when created in this format, but I was unfamiliar with the concept of inputting
conversion units.

7
References

Website unit conversion to verify the results of calculations:


Wight Hat Ltd., https://www.metric-conversions.org/, (accessed Sep. 6, 2022)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy