[SOLVED] CSE101 –HomeWork #5

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon HW5-weirom.zip (2.9 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (1 vote)

In this homework you have to sort all the people given in “hw4_disordered_people.txt”. You will get the sort column from the user and write the ordered people in “orderedFile.txt”.

Standart column order is as shown (items aren’t sorted):

ID NAME SIR NAME MAIL
4564765 Andria MALLE [email protected]
246574 Andrea DENNIS [email protected]
454 Angeline TOWNSEND [email protected]
3245

…..

Ania DEAR [email protected]

The column selected by the user will be placed on the first column and the order will be made according to it. Sample:

Give a Sort Metric (I = ID               N= NAME S= SIR NAME                M=MAIL): M
Output file will be as shown (sorted by mail): NAME SIR NAME (this line must be added)
MAIL        ID
[email protected] 4564765 Andria MALLE
[email protected] 246574 Andrea DENNIS
[email protected]        3245 Ania DEAR
[email protected]

…..

       454 Angeline TOWNSEND
 
Give a Sort Metric (I = ID               N= NAME            S= SIR NAME                    M=MAIL): N

Output file will be as shown (sorted by name):

NAME      ID SIR NAME MAIL                                              (this line must be added)
Andrea 246574 DENNIS [email protected]
Andria 4564765 MALLE [email protected]
Ania      3245 DEAR [email protected]
Angeline

……

     454                        TOWNSEND       [email protected]
 

The order of ascii table will be used in the sorting. Detailed in the next page.

Tips:

  • If tou need you can use itoa function to convert integer to char array:

http://www.cplusplus.com/reference/cstdlib/itoa/

  • There is no restriction to use of c libraries.

Rules:

  • Console inputs must be accept upper case character “N, M,I,S”. Can be accept lower case character “n, m, i, s”
  • Output file name: txt
  • Input file name is: txt
  • Upload your files only in a .zip file on Moodle. The zip name should be in the same in the form of: number_name_surname (g.e. 181041001_abdullahsalih_bayraktar.zip).
  • Zip file can contain source files with “c” and or “h” extension. No other files excluding hw4_disordered_people.txt (look at next rule).
  • You can add a working “hw4_disordered_people.txt” file in zip. (It is chanced because it can be possible that your homework is not finish and work only with unique input file).
  • main file name: student_id_main.c (e.g. c)

 

  • HW5-weirom.zip