1. Engineering
  2. Computer Science
  3. what is the problem with this code and how do...

Question: what is the problem with this code and how do...

Question details

#ifndef COURSE H #define COURSE H # include<iostream» #include <cstdìnt> # include<string> class Course private: std::string courses: std: :string title; double grade; uint8 t credit_hours; public: Course O: Course (std::string courses, std::string tit courses, std: :string title, double grade, uint8 t credit hours) const std::string &getCoursesO void setCourses (const std: :string &courses): const std: :string sgetTitle rs

16 17 18 19 20 public Course0 Course istd:istring courses, std:istring cicle, double grade, nint8 t credit houra) const std::string sgetCourses0 void setCourses (const std::string scourses) 24 25 const std::string sgetTitle) void setTitle const std::string stitle) : double getGrade ) void setGrade (double grede) 27 uintB t getcreditHours void setCreditHours (uint8 t credit hours) 34 35

Iinclude course . h 3 using namespace std: 5 const string sCourse: :getcourseso 8 void Course: :setCourses (const 11 const string &Course::getTitle return couses string scourses) cours e : : cour se s cours es ; return title: 14 void Course: :setTitie (const string stitle Course:ititletitle: 17 double Course: :getGrade ) 18 19 20 void Course::setGrade (double grade) ( return grade: Course:: grade grade 23ints t Course: :getcreditHOurs)

Course:i gradegrade: 23 ints t Course: :getCreditHours ) 24 retorn credit hours: void Course: :setCreditHoura (aint8 t credithours) Course: seredit hours credit hours 30 Course: course o Course: Course latd::string :string coursesFar, std:istring titlefaz, double gradePar, ints t eredit houraPaz courses-CoUeaPati ticle-titlePar grade-gradePar: credit hours-credit hoursPax: oatreami operatorclosczeani os, const Course c

grad. Par. Coase. Cou-coartastatringcourse,Par. std: :string titlebar. dy ble aint. t credit hours-credit houxshat:

what is the problem with this code and how do i fix it?
also make a main file to see the implementation and put a setall function inside so that it can change all of the members to a certain value

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution