[Solved] C Programming Language #Project 9

$25

File Name: C_Programming_Language_#Project__9.zip
File Size: 320.28 KB

SKU: [Solved] C Programming Language #Project – 9 Category: Tag:
5/5 - (1 vote)

In this project, you must create a music stack list which has The Turkish Five. The Turkish Five is a name used to identify five pioneers of western classical music in Turkey. The Turkish Five composers are listed below in the table.

Name (char []) Surname (char [] Musical_Work(char []) age (int)
Cemal Reit Rey Lks Hayat 80
Ahmed Adnan Saygun Yunus Emre 83
Ulvi Cemal Erkin Kelolan 66
Hasan Ferit Alnar Sar Zeybek 72
Necil Kazm Akses kinci Senfoni 90

Create a stack that is implemented with a linked list. You must define struct person like;

struct person{

name (char[]);

surname (char[]);

musical_Work(char[]);

age(int);

struct person *next;

} *top;

In your program, you have to create a menu which has the following operations.

  • Add a Person to the Stack

Take persons information with scanf, create a node and add the node to the stack using the

function addNode(char name[], char surname [], char creation [], int age).

Page 1 of 5

  • Pop a Person from the Stack

Delete the last node of the stack. Create deleteNode() to pop a node.

  • Sort in Alphabetical Order

Write a method Sort_Alphabetically() to order the names of the people in the stack alphabetically. Use the print_stack() method to show the sorted stack.

  • Sort Age in Increasing Order

Write a method Sort_Increasingly() that sorts ages of people in the stack in increasing order. Use the print_stack() method to show the sorted stack.

  • Exit menu

Quit menu.

Example Output; (User entered values are written in bold.)

****MENU****

  • Add a Person to the Stack
  • Pop a Person from the Stack
  • Sort Alphabetical Order
  • Sort Age in Increasing Order
  • Exit menu

*************

Select your Choise: 1

Name: Cemal Reit Surname: Rey

Creation: Lukus Hayat

Age: 80

1)Cemal Reit

Rey

Lukus Hayat

80

****MENU****

  • Add a Person to the Stack
  • Pop a Person from the Stack
  • Sort in Alphabetical Order
  • Sort Age in Increasing Order
  • Exit menu

*************

Select your Choise: 1

Name: Ahmed Adnan

Surname: Saygun

Creation: Yunus Emre

Age: 83

1) Ahmed

Adnan Saygun

Yunus Emre

83

2)Cemal Reit

Rey

Lukus Hayat

80

****MENU****

  • Add a Person to the Stack
  • Pop a Person from the Stack
  • Sort in Alphabetical Order
  • Sort Age in Increasing Order
  • Exit menu

Select your Choise: 1

*************

Name: Ulvi Cemal

Surname: Erkin

Creation: Kelolan

Age: 66

  • Ulvi Cemal Erkin

Kelolan

66

  • Ahmed

Adnan Saygun

Yunus

Emre 83

3)Cemal Reit

Rey

Lukus

Hayat 80

****MENU****

  • Add a Person to the Stack
  • Pop a Person from the Stack 3- Sort in Alphabetical Order
  • Sort Age in Increasing Order
  • Exit menu

*************

Select your Choise: 1

Name: Hasan Ferit

Surname: Alnar

Creation: Sar Zeybek Age: 72

  • Hasan

Ferit Alnar Sar Zeybek

72

  • Ulvi Cemal Erkin

Kelolan

66

  • Ahmed

Adnan Saygun

Yunus

Emre 83

4)Cemal Reit

Rey

Lukus Hayat

80

****MENU****

  • Add a Person to the Stack
  • Pop a Person from the Stack
  • Sort in Alphabetical Order
  • Sort Age in Increasing Order
  • Exit menu

*************

Select your Choise: 2

  • Ulvi Cemal Erkin

Kelolan

66

  • Ahmed

Adnan Saygun

Yunus

Emre 83

3)Cemal Reit

Rey

Lukus

Hayat 80

****MENU****

  • Add a Person to the Stack
  • Pop a Person from the Stack 3- Sort in Alphabetical Order
  • Sort Age in Increasing Order
  • Exit menu

*************

Select your Choise: 3

Ahmed Adnan

Saygun

Yunus Emre 83

Cemal Reit

Rey

Lukus Hayat

80

Ulvi Cemal

Erkin Kelolan

66

****MENU****

  • Add a Person to the Stack
  • Pop a Person from the Stack
  • Sort in Alphabetical Order
  • Sort Age in Increasing Order
  • Exit menu

*************

Select your Choise: 4

Ulvi Cemal

Erkin

Kelolan

66

Cemal Reit

Rey

Lukus Hayat

80

Ahmed Adnan

Saygun

Yunus Emre

83

Page 5 of 5

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] C Programming Language #Project 9
$25