Write a C++ Program Design a class named TermPaper that holds an author’s name, the subject of the paper, and an assigned letter grade. Include methods to set the values for each data field and display the values for each data field. Create the class diagram and write the pseudocode that defines the class. Pseudocode PLD Chapter 10 #3 pg. 468 // Start // Declarations // TermPaper paper1 // string firstName // string lastName // string subject // character grade

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Write a C++ Program

Design a class named TermPaper that holds an author’s name, the subject of the paper, and an assigned letter grade. Include methods to set the values for each data field and display the values for each data field. Create the class diagram and write the pseudocode that defines the class.

Pseudocode PLD Chapter 10 #3 pg. 468
// Start
// Declarations
// TermPaper paper1
// string firstName
// string lastName
// string subject
// character grade
// output "Please enter first name. "
// input firstName
// output "Please enter last name. "
// input lastName
// output "Please enter subject. "
// input subject
// output "Please enter letter grade. "
// input grade
// Set the first name for paper1
// Set the last name for paper1
// Set the subject for paper1
// Set the letter grade for paper1
// output "First Name: ", paper1.getFirstName()
// output "Last Name: ", paper1.getLastName()
// output "Subject: ", paper1.getSubject()
// output "Grade: ", paper1.getGrade()
// Stop

header file

#include <string>
using namespace std;
#ifndef _TermPaper
#define _TermPaper
class TermPaper
{
private:
string fName; // first name
string lName; // last name
string subject; // subject of the paper
char letterGrade; // assigned letter grade
public:
TermPaper( );
void setFName(string fN);
void setLName(string lN);
void setSubject(string sub);
void setLetterGrade(char grade);
string getFName( );
string getLName( );
string getSubject( );
char getLetterGrade( );
};
#endif

Term Paper.cpp

#include <cstdlib>
#include <iostream>
#include "Termpaper.h"
using namespace std;
TermPaper::TermPaper( )
{
fName = "";
lName = "";
subject = "";
letterGrade = 'F';
}
void TermPaper::setFName(string fN)
{
fName = fN;
}
void TermPaper::setLName(string lN)
{
lName = lN;
}
void TermPaper::setSubject(string sub)
{
subject = sub;
}
void TermPaper::setLetterGrade(char grade)
{
letterGrade = grade;
}
string TermPaper::getFName( )
{
return fName;
}
string TermPaper::getLName( )
{
return lName;
}
string TermPaper::getSubject( )
{
return subject;
}
char TermPaper::getLetterGrade( )
{
return letterGrade;

}

 

An example of what I need help written:

// This program uses the programmer-defined Vehicle class. 
#include <iostream>
#include "Vehicle.h"

using namespace std; 
int main()
{
   Vehicle vehicleOne;
   
   vehicleOne.setMaxSpeed(100.0);
   vehicleOne.setSpeed(35.0);
   vehicleOne.accelerate(10.0);
   cout << "The current speed is " << vehicleOne.getSpeed() << endl;

   vehicleOne.accelerate(60.0);
   cout << "The current speed is " << vehicleOne.getSpeed() << endl;
   
   return 0;
}

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY