0% found this document useful (0 votes)
1 views1 page

Lab 1

The document outlines a group lab work assignment for a course on Data Structures and Algorithms Analysis at the University of Dodoma. It includes tasks such as creating structures for employee and date data, implementing linked lists in C++, and discussing sorting algorithms with a focus on bubble sort. The submission mode is specified as a presentation, with details on the date and venue for the presentation.

Uploaded by

Lucky Machaba
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)
1 views1 page

Lab 1

The document outlines a group lab work assignment for a course on Data Structures and Algorithms Analysis at the University of Dodoma. It includes tasks such as creating structures for employee and date data, implementing linked lists in C++, and discussing sorting algorithms with a focus on bubble sort. The submission mode is specified as a presentation, with details on the date and venue for the presentation.

Uploaded by

Lucky Machaba
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
You are on page 1/ 1

THE UNIVERSITY OF DODOMA

COLLEGE OF INFORMATICS AND VIRTUAL EDUCATION


DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
CP 213: DATA STRUCTURES AND ALGORITHMS ANALYSIS
Group Lab Work
1. Create a structure called employee that contains two members: an employee
number (type int) and the employee‘s compensation (in Tshs; type float). Ask
the user to fill in this data for three employees, store it in three variables of
type struct employee, and then display the information for each employee.

2. Using the structure formed in question 1:


a. Write C++ code to implement a linked list of 15 nodes. Display all data
from the linked list
b. Write a code segment to delete 6th to 10th nodes. Display all remained
data from the linked list.

3. Create a structure of type date that contains three members: the month, the
day of the month, and the year, all of type int. (Or use day-month-year order
if you prefer). Have the user enter a date in the format 12/31/2001, store it in
a variable of type struct date, then retrieve the values from the variable and
print them out in the same format.

4. Using the structure formed in question 2:


a. Write C++ code to implement a linked list of 15 nodes. Display all data
from the linked list
b. Write a code segment to delete the last 5 nodes. Display all remained
data from the linked list.
5. What is sorting Algorithms? Discuss.
a. Write a C++ code to implement bubble sort algorithms
b. Show how arr[] = {5, 3, 43, 8, 17, 20, 1, 35, 60, 51} is sorted by the
algorithm in 5(a)
Mode of Submission:
- Mode: Presentation mode
- Date of presentation: Upon completion of the work, make an appointment
for presentation.
- Venue: Computer Lab or BA 09 CIVE Administration Block

You might also like