C++代写 代写C++程序 C++作业代写 C++程序代写

C++程序作业代写, C++ Lab代写, C++代写, C++编程代做

description of cOURSEWORK


Course Code

SOF105

Course Name

Data Structure

Lecturer

Dr. Saif Kifah

Academic Session

2021/04

Assessment Title

Assignment 1


A.Introduction/ Situation/ Background Information

This assignment is to evaluate the ability of students in applying the concepts of binary search, recursion, arrays and linked list to solve certain C++ programming problems.


B.Course Learning Outcomes (CLO) covered

At the end of this assessment, students are able to:

CLO 2Comprehend the concepts of data structures, logical structure and storage structure of data and their basic operation

CLO 3Demonstrate ability to solve practical problems using suitable data structures and methods

C.University Policy on Academic Misconduct


1.Academic misconduct is a serious offense in Xiamen University Malaysia. It can be defined as any of the following:

i.Plagiarism is submitting or presenting someone else’s work, words, ideas, data or information as your own intentionally or unintentionally. This includes incorporating published and unpublished material, whether in manuscript, printed or electronic form into your work without acknowledging the source (the person and the work). 

ii.Collusion is two or more people collaborating on a piece of work (in part or whole) which is intended to be wholly individual and passed it off as own individual work.

iii.Cheating is an act of dishonesty or fraud in order to gain an unfair advantage in an assessment. This includes using or attempting to use, or assisting another to use materials that are prohibited or inappropriate, commissioning work from a third party, falsifying data, or breaching any examination rules.


2.All the assessment submitted must be the outcome of the student. Any form of academic misconduct is a serious offense which will be penalised by being given a zero mark for the entire assessment in question or part of the assessment in question. If there is more than one guilty party as in the case of collusion, both you and your collusion partner(s) will be subjected to the same penalty.


D.Instruction to Students

You are required to answer all the assignment questions in Section F. This is an individual assignment. You are required to prepare one softcopy of a typewritten report detailing the answers to the assignment questions. The deadline of this assignment is on 8/11/2021. Late submission will result in a penalty.The report should include the following sections in the same sequence,

·Cover page: student name and student id

oAssignment Cover Pages (must be filled and signed by student) - attached

·C++ programs section: source code with comments

oInclude C++ program for each task from Section F

·Results section: detailed description of results

oInclude all programs results/outputs with descriptions in your own words

·Marking rubrics: Include at the end of report/document – attached.





E.Evaluation Breakdown

No.

Component Title

Percentage (%)

1.

Binary Search (Recursion)

20

2.

Recursion

20

3.

Merging

30

4.

Bubble sort

30


TOTAL

100


F.Task(s)

1.Write a C++ program to do the following:

·Create an array size of 10, and generate a set of characters (user input) into the array in ascending order. All characters in the array must be unique. Also, ask the user to input a character to be searched in the array.

·The program will perform a binary search on the array using a recursive function to find the character.

·Call the binary search function to find the character, and print the output if the character exists and specify the location; otherwise, show that the character does not exist.

·Note that, if the input of the array is not ascending or unique the program should notify the user (re-input the characters).         [20 marks]

2.Given a mathematical formula as follows:


Write a complete C++ program to do the following:

·Prompt the user the value of n.

·Implement the above mathematical formulae using mutual recursion based on the following function prototype:

int fOdd(int n);

int fEven(int n);

Print the output of the program showing the result of the mathematical formula.      [20 marks]

3.Write a program to input negative and positive numbers into two arrays (arr1 and arr2). Merge both arrays into a third array (arr3) where all negative numbers are located on the left side of the array and positive numbers on the right. Look at the following example:


9

-3

5

-4


2

7

-6

1


-3

-4

-6

1

7

2

5

9



Note that, you are not allowed to use any sorting algorithm in this task.

 [30 marks]


4.Write a C++ function named BubbleSort that performs bubble sort to sort an array of integers. The function should be able to sort the array in ascending order or descending order. The function should also display step-by-step changes in each pass when the array is being sorted. The function should be able to display whether it's the worst case or the best case. What needs to be done to improve the complexity of the best case?

[30 marks]

 
 

APPENDIX 1

Marking Rubrics


Component Title

Binary Search (Recursion)

Percentage (%)

20

Criteria

Score and Descriptors

Weight (%)

Marks

(17-20)

(15-17)

(10-15)

(5-10)

(0-5)


C++ program and Results

Code free of errors.

Excellent use of variables and organization. Output provided


No errors in the coding able to compile the code. Not efficient use of variable, output not included

Some mistakes in the coding Not efficient use of variable, missing some tasks

Few mistakes in the coding Not efficient use of variable, missing few tasks

Many mistakes in the coding unable to compile the code, missing many tasks 


20


TOTAL

20





Component Title

Recursion

Percentage (%)

20

Criteria

Score and Descriptors

Weight (%)

Marks

(17-20)

(15-17)

(10-15)

(5-10)

(0-5)


C++ program and Results

Code free of errors.

Excellent use of variables and organization. Output provided


No errors in the coding able to compile the code. Not efficient use of variable, output not included

Some mistakes in the coding Not efficient use of variable, missing some tasks

Few mistakes in the coding Not efficient use of variable, missing few tasks

Many mistakes in the coding unable to compile the code, missing many tasks 


20


TOTAL

20


Note to students: Please print out and attach this appendix together with the submission of coursework








APPENDIX 2


Marking Rubrics


Component Title

Merging two arrays

Percentage (%)

30

Criteria

Score and Descriptors

Weight (%)

Marks

(25-30)

(20-25)

(15-20)

(10-15)

(5-10)

(0-5)

C++ program and Results

Code free of errors.

Excellent use of variables and organization. Output provided


No errors in the coding able to compile the code. Not efficient use of variable, output not included

Some mistakes in the coding Not efficient use of variable, missing some tasks

Few mistakes in the coding Not efficient use of variable, missing few tasks

Many mistakes in the coding unable to compile the code, missing many tasks 

Unable to compile the program, many errors, many missing tasks

30


TOTAL

30




Marking Rubrics


Component Title

Bubble sort

Percentage (%)

30

Criteria

Score and Descriptors

Weight (%)

Marks

(25-30)

(20-25)

(15-20)

(10-15)

(5-10)

京ICP备2025144562号-1
微信
程序代写,编程代写
使用微信扫一扫关注
在线客服
欢迎在线资讯
联系时间: 全天