ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 12 Weeks Ago, 1 Day Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 27 Apr 2017 My Price 9.00

external functions of the class

I NEED HELP WITH THIS ASAP HAVE TO SUBMIT IT TODAY. AS I AM STUCK IN AN EMERGENCY.  PLEASE REFER TO THE FOLLOWING ATTACHED FILE. THANK YOU.

 

1 P5.1 Given the following student class interface, a) implement all member functions of the class, b) implement all
non-member external functions of the class, and c) write a main() function to generate an output similar to the sample
output appeared after the class interface. Notice that not all pre- and post-conditions for functions are provided; some
are intentionally left out for you to fill in. // **** student class interface for P4.1 ****
class student
{
public:
student();
student(string, int, double);
void inputStuRec();
// prompts the user to enter name (for simplicity, last name only), credits completed and GPA
// Postcondition: Data mambers of the calling object is filled with values entered by the user
void outputStuRec();
// Postcondition: contents of the calling object is displayed in a format shown in the sample output
void setName(string& str);
// "Mutator" or "mutator function"
// Postcondition: data member name of the calling object has been set to str
void setCredits(int);
void setGPA(double);
void setStuRec(string, int, double);
bool comapreName(student& obj2);
// Name of the calling object is comapare to that of obj2
// Postcondition: if calling object > obj2, returns true; otherwise, return false
bool compareGPA(student& obj2);
// GPA of the calling object is comapare to that of obj2
// Postcondition: if calling object > obj2, returns true; otherwise, return false
void swap(student& obj2);
// Postcondition: contents of the calling object and obj2 are swapped
private:
string name;
// Last name only
int credits;
double GPA;
}; // **** External functions ****
int fillStuArray(student, int size);
// prompt the user to enter up to “size” (the capacity of the array) student records
// Postcondition: student array has been filled with n records with values entered by the user, where n <= size; the value of n is returned
void sortStuArrayByName(student, int n);
// Postcondition: student array has been sorted by student name in alphabetical order
void displayStuReport(student, int n);
// Postcondition: n student records stored in the student array are displayed Sample output: 2 P5.2 Given the following student class interface, a) implement all member functions of the class, b) implement all
non-member external functions of the class, and c) write a main() function to generate an output similar to the sample
output appeared after the class interface. Notice that not all pre- and post-conditions for functions are provided; some
are intentionally left out for you to fill in. // **** student class interface for P4.2 ****
#include <iostream>
#include <string>
#include <iomanip>
using namespace std; class student
{
public:
student();
student(string, int, double);
string getName();
// "Accessor" or "accessor function"
// Postcondition: returns the GPA of the calling object 3
int getCredits();
double getGPA();
void setName(string& str);
// "Mutator" or "mutator function"
// Postcondition: data member name of the calling object has been set to str
void setCredits(int);
void setGPA(double);
void setStuRec(string, int, double);
private:
string name;
int credits;
double GPA;
}; // Last name only // **** External functions for P4.2 ****
void inputStuRec(student& obj);
// prompts the user to enter values to fill obj
// Postcondition: obj is filled with user entered values
void outputStuRec(student& obj);
// Postcondition: contents of obj is displayed
int fillStuArray(student, int size);
void sortStuArrayByName(student, int n);
void displayStuReport(student, int n);
void swap(student&, student&);
bool compareName(student& obj1, student& obj2);
bool compareGPA(student& obj1, student& obj2); P5.3 Enhance either P4.1 or P4.2 by allowing the user to enter full name for each student in the format of Last-name,
First-Name, e.g., Doe, John.

Attachments:

Answers

(11)
Status NEW Posted 27 Apr 2017 06:04 AM My Price 9.00

-----------

Attachments

file 1493276340-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)