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

Assignment No 1 LinkLIst Fall 2021 27102021 051317pm

This document is an assignment for a Data Structures and Algorithms course at Bahria University, Lahore Campus, due on November 5, 2021. It includes two programming tasks: creating an airline ticket reservation program using a linked list and converting a string to pig Latin form while utilizing a linked list for character storage. Submission requires a handwritten hard copy and a working demo with a viva voce in the lab, with no late submissions accepted.
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)
5 views1 page

Assignment No 1 LinkLIst Fall 2021 27102021 051317pm

This document is an assignment for a Data Structures and Algorithms course at Bahria University, Lahore Campus, due on November 5, 2021. It includes two programming tasks: creating an airline ticket reservation program using a linked list and converting a string to pig Latin form while utilizing a linked list for character storage. Submission requires a handwritten hard copy and a working demo with a viva voce in the lab, with no late submissions accepted.
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

Bahria University

Lahore Campus

DATA STRUCTURE AND ALGORITHMs


ASSIGNMENT # 01
DUE DATE: 05, November 2021

Instructor Name: Mr. Tahir Iqbal


Program: BSCS 3A, BSCS 3B,

Submission Requirements:
1. Handwritten Hard Copy.
2. Working Demo will be shown along with viva voce in the respective lab.
3. No Late submissions will be accepted.

Question No.1
Write a simple airline ticket reservation program. The program should display a menu with the following operations:
reserve a ticket, cancel a reservation, check whether a ticket is reserved for particular person, and display the
passengers. The information is maintained on an alphabetized linked list of names. In a simper version of the
program, assume that tickets are reserved for only one flight. In a fuller version, place no limit on the number of
flights. Create a linked list of flights with each node including pointer to a linked list of passengers.

Question No.2
Write a program that prompts the user to input a string and then outputs the string in the pig
Latin form. The rules for converting a string into pig Latin form are as follows:

a. If the string begins with a vowel, add the string "-way" at the end of the string. For example, the pig
Latin form of the string "eye" is "eye-way".

b. If the string does not begin with a vowel, first add "-" at the end of the string. Then rotate the string one character

at a time; that is, move the first character of the string to the end

of the string until the first character of the string becomes a vowel. Then add the string "ay" at the end. For
example, the pig Latin form of the string "There" is "ere-They".

c. Strings such as "by" contain no vowels. In cases like this, the letter y can be considered a vowel.
So, for this program the vowels are a, e, i, o, u, y, A, E, I, O, U, and Y. Therefore, the pig Latin form
of "by" is "y-bay".

d. Strings such as "1234" contain no vowels. The pig Latin form of the string "1234" is "1234-way". That
is, the pig Latin form of a string that has no vowels in it is the string followed by the string "-way".

Your program must store the characters of a string into a linked list and use the function rotate.

Good Luck

You might also like