Find Jobs
Hire Freelancers

C++ programming 2

$30-50 USD

Abgesagt
Veröffentlicht vor mehr als 11 Jahren

$30-50 USD

Bezahlt bei Lieferung
to use a vector of structs to sort the data. You are collecting a file of information about students who are applying to your program. The file contains the first name, last name, GPA, and age of each student. Your tasks are to 1) read this data in from the user-specified file to a vector of structs 2)sort the data in ascending order by the user-specified criteria, and 3)print the sorted data to the screen for review. Procedure It will be most helpful to break each activity into a separate function. In my solution, I wrote the following functions: A File Reading Function for the vector of structs Sort functions (based on what option you insert) A Print Function Details and Specifications Collections of data which, together, describe a more complex object are common in the real world. For example, such information as first name, last name, social security number, address, and age may be collected together to form a more complex object called “Person”. In the case of Lab 4, we are collecting first name, last name, GPA, and age data to represent a student. You need to define a correct struct to represent student. The user-specified input file will contain data for a certain number of students, one on each line. Each line of the input file has the following format: <first name, one word string><space><last name, one word string ><space><GPA, float><space><age, int> In your main function, you will need to create a vector of student structs. To read in the students data into vector of students, you should write a function. The file reading functions should open the user-specified file and read the student data into the array using sentinel loop logic. You may use push_back(), size(), and some other functions from <vector>. To sort the student data for each storage system, you should write a function. The sorting function should sort students in ascending order (small to large) according to the criteria the user has specified. These sorting functions should NOT simply print the sorted order, but should actually modify the student vector in memory so that they are stored in sorted order. Printing the data should be straightforward, simply mimic the output from my example output captures below: (Note: Output menu and sorted table should be column-aligned using setw( ), you can assume that first and last names will be no longer than 25 characters) Your program should have the exact output as following: Design Use two files (1) student.h : declare your student struct (2) [login to view URL]: write your programs in this file
Projekt-ID: 2534372

Über das Projekt

2 Vorschläge
Remote Projekt
Aktiv vor 12 Jahren

Möchten Sie etwas Geld verdienen?

Vorteile einer Ausschreibung auf Freelancer

Legen Sie Ihr Budget und Ihren Zeitrahmen fest
Für Ihre Arbeit bezahlt werden
Skizzieren Sie Ihren Vorschlag
Sie können sich kostenlos anmelden und auf Aufträge bieten
2 Freelancer bieten im Durchschnitt $70 USD für diesen Auftrag
Avatar des Nutzers
Hi, I am C++ expert and can surely help you here, Please check your inbox, Thanks
$40 USD in 1 Tag
4,8 (111 Bewertungen)
5,9
5,9
Avatar des Nutzers
Hi, i can do this job. i will deliver documented sources + exe + help notes. Regards,
$100 USD in 3 Tagen
0,0 (0 Bewertungen)
0,0
0,0

Über den Kunden

Flagge von UNITED STATES
Southfield, United States
5,0
8
Zahlungsmethode verifiziert
Mitglied seit Sept. 25, 2012

Kundenüberprüfung

Danke! Wir haben Ihnen per E-Mail einen Link geschickt, über den Sie Ihr kostenloses Guthaben anfordern können.
Beim Senden Ihrer E-Mail ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.
Registrierte Benutzer Veröffentlichte Jobs
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Vorschau wird geladen
Erlaubnis zur Geolokalisierung erteilt.
Ihre Anmeldesitzung ist abgelaufen und Sie wurden abgemeldet. Bitte melden Sie sich erneut an.