Skip to document

Assignment 202304 docx

assignment
Course

Problem Solving and Programming Design (ITS41804)

3 Documents
Students shared 3 documents in this course
Academic year: 2022/2023
Uploaded by:

Comments

Please sign in or register to post comments.

Preview text

ITS41804 Problem Solving and Programming Design

ASSIGNMENT

Cover Sheet

HAND OUT DATE: 31 May 2023

HAND IN DATE: 19 June 2023

FEEDBACK DATE: by 3 July 2023

WEIGHTAGE: 20%

SEMESTER: April 2023

Instructions to student:

 This is an individual assignment.

 Complete this cover sheet and the marking rubric, then submit together with

your assignment.

Student declaration:

I declare that:

 I understand what is meant by plagiarism

 The implication of plagiarism has been explained to me by our lecturer

This assignment is my own work.

Name and Signature Student ID

Page 2 of

4

PROBLEM 1: (10%)

Draw a flowchart and write a pseudocode algorithm based on the following scenario:

You are required to display minimum and maximum number from the range of input

numbers given by the user. The program will ask for the numbers of values need to

be entered at the beginning of the program.

PROBLEM 2: (10%)

You are required to write a C program that able to show a list of menus and let the

user to choose the function based on the option in the menu. The implementation of

the program must use switch-case and other selection statements, and loops.

The menu is as follows:

Option 1: Fibonacci

Option 2: Fuel consumption

calculator Option 3: Smallest Digit

Option 4: Exit the program

User will choose the option [1-4] from the menu then the program will perform

each sub- section. After completing the section, the program will return to the

menu.

The following are the list of requirements for each option in the menu:

Option 1: Fibonacci

Generates the Fibonacci sequence up to a specified number of terms provided by the

user. The program should demonstrate the use of iteration and selection constructs to

calculate and display the Fibonacci sequence.

The Fibonacci sequence is a series of numbers in which each number is the sum of

the two preceding ones, usually starting with 0 and 1. The sequence goes: 0, 1, 1,

2, 3, 5, 8, 13, 21, and so on.

Option 2: Fuel Consumption Calculator

Develop a basic fuel consumption calculator based on the user's input of distance

traveled and fuel consumed.

The fuel consumption should be calculated in liters per 100 kilometers (L/100km) and

miles per gallon (MPG). The user should be able to input the distance traveled in

kilometers or miles and the fuel consumed in liters or gallons. The program should

then display the fuel consumption in both L/100km and MPG.

Use the following

Page 4 of

4

1 liter = 0 gallons

Option 3: Smallest Digit

In this section, the user will enter a 5-digit number. Then, the program will output the

smallest digit of the of the number.

Example of output:

Please enter a 5-digit number: 32103

The smallest digits is: 1

Option 4: Exit the program

After completing the task of each option, the program should return to menu for

user to select the next option.

The program will only terminated when user chooses this option, your program should

exit with a thank you message. However, if the selected option is not 1 to 5 then

your program should display a message and ask the user to key-in the option again.

Submission Guideline:

1. Platform: MYTIMES

2. Deliverable:

 Cover sheet

 Marking rubric

 Problem 1: Pseudocode + flowchart

 Problem 2: one C Program

Marking Rubrics

Student name: Student ID:

Criteria Weightage Outstanding (9-10) Mastering (7-8) Developing (5-6) Beginning (0-4)

Utilize flexible and

divergent thinking in

developing the

solution from

available information

TGC1.

10 Develop a

comprehensive and

consistent plan to solve

the proposed problem

with correct

pseudocode/ flowchart.

Develop a feasible

and consistent plan to

solve the proposed

problem with correct

pseudocode/ flowchart.

Develop a feasible plan

to solve the proposed

problem and with

minor error in

pseudocode/

flowchart.

Develop a plan to

solve the proposed

problem and with

multiples errors in

pseudocode/

flowchart.

Apply different

programming logic and

problem-solving skills

in the application

development.

TGC 1.

10 Solution presented solves

the problem stated correctly

and meets all requirements

of the problem according to

the application theme.

Solution of the

functionalities are clearly

presented. Solution

represents an elegant

and effective way to

solve the problem and is

not overly complicated

than is necessary.

Solution is clearly

adhered to the

programming style.

Solution is mostly

correct, satisfying most

of the above criteria

under the exemplary

category, but contains

some minor pitfalls,

errors/flaws or

limitations.

Solution demonstrates a

viable approach toward

solving the problem but

contains some major

pitfalls, errors/flaws or

limitations.

No solution provided

or critical elements of

the solution are

missing or significantly

flawed.

Solution does not

demonstrate sufficient

understanding of

the problem and/or

any reasonable

directions to solve

the problem.

Solution does not

adhere to the

programming style.

Was this document helpful?

Assignment 202304 docx

Course: Problem Solving and Programming Design (ITS41804)

3 Documents
Students shared 3 documents in this course
Was this document helpful?
ITS41804 Problem Solving and Programming Design
ASSIGNMENT
Cover Sheet
HAND OUT DATE:
31 May 2023
HAND IN DATE:
19 June 2023
FEEDBACK DATE:
by 3 July 2023
WEIGHTAGE:
20%
SEMESTER:
April 2023
Instructions to student:
This is an individual assignment.
Complete this cover sheet and the marking rubric, then submit together with
your assignment.
Student declaration:
I declare that:
I understand what is meant by plagiarism
The implication of plagiarism has been explained to me by our lecturer
This assignment is my own work.
Name and Signature Student ID