what should i do so that i can call the function computecoursework?
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
what should i do so that i can call the function computecoursework?
![C:\Users\huawei\Desktop\CPM213 LAB\example assignment.cpp - Dev-C++ 5.11
O X
File Edit Search View Project Execute Tools AStyle Window Help
TDM-GCC 4.9.2 64-bit Release
(globals)
Project Classes Debug
[*] ASSIGNMENT 1.cpp composition.cpp dynamic.cpp example assignment.cpp exp1.cpp exp6.cpp friendfunction.cpp Inheritance.cpp L2Q2.cpp L2Q3.cpp L2Q4.cpp L3Q1.cpp L3Q2.cpp L3Q3.cpp
void setcw(float cw)
{cw_mark=cw;
void printcwdetail()
35
36
}
37
38 E
cout <« "\n\t" < getname () <« "\t" « getmatric() « "\t" << test1 <« assignment1 <« cw_mark << endl;
}
coursework()
{test1=assignment1=0;}
"coursework ()
{test1=assignment1=0;
void computecw()
{cw_mark=test1*0.2+assignment1*0.3; }
};
int main()
39
40
41
42
43
44
45
46
47
48
49 E {
coursework cpt113;
string name;
int matric;
int test1;
int assignment1;
50
51
52
53
54
55
56
cout<<"name :";
getline(cin, name);
cout<<"\nmatric no :";
cin>>matric;
cout<<"\ntest 1 :";
cin>>test1;
cout « "\nAssignment 1 :";
cin>> assignment1;
cout « "\nCoursework mark: " k< cpt113.computecw();
57
58
59
60
61
62
63
64
66
88 Compiler (113)
Resources dh Compile Log V Debug a Find Results
Close
Line
Col
File
Message
65
32
C:\Users\huawei\Desktop\CPM213 LAB\example assign. [Error] no match for 'operator<<' (operand types are 'std:basic_ostream<char>' and 'void')
65
CAll-arel h.unil DarltanlCDA712I AD
ENetelsandid-ter are
Line: 65
Col: 35
Sel: 0
Lines: 66
Length: 1244
Insert
Done parsing in 0 seconds
7:50 PM
IMI
DEV
O Type here to search
85°F Light rain
a 4)) ENG
16/12/2021](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F26bcc706-1d6a-4c95-be9e-aef76f432780%2Fa214dd0b-c2f5-4994-bf23-e31683bb0bd2%2Fw6rsq3f_processed.png&w=3840&q=75)
Transcribed Image Text:C:\Users\huawei\Desktop\CPM213 LAB\example assignment.cpp - Dev-C++ 5.11
O X
File Edit Search View Project Execute Tools AStyle Window Help
TDM-GCC 4.9.2 64-bit Release
(globals)
Project Classes Debug
[*] ASSIGNMENT 1.cpp composition.cpp dynamic.cpp example assignment.cpp exp1.cpp exp6.cpp friendfunction.cpp Inheritance.cpp L2Q2.cpp L2Q3.cpp L2Q4.cpp L3Q1.cpp L3Q2.cpp L3Q3.cpp
void setcw(float cw)
{cw_mark=cw;
void printcwdetail()
35
36
}
37
38 E
cout <« "\n\t" < getname () <« "\t" « getmatric() « "\t" << test1 <« assignment1 <« cw_mark << endl;
}
coursework()
{test1=assignment1=0;}
"coursework ()
{test1=assignment1=0;
void computecw()
{cw_mark=test1*0.2+assignment1*0.3; }
};
int main()
39
40
41
42
43
44
45
46
47
48
49 E {
coursework cpt113;
string name;
int matric;
int test1;
int assignment1;
50
51
52
53
54
55
56
cout<<"name :";
getline(cin, name);
cout<<"\nmatric no :";
cin>>matric;
cout<<"\ntest 1 :";
cin>>test1;
cout « "\nAssignment 1 :";
cin>> assignment1;
cout « "\nCoursework mark: " k< cpt113.computecw();
57
58
59
60
61
62
63
64
66
88 Compiler (113)
Resources dh Compile Log V Debug a Find Results
Close
Line
Col
File
Message
65
32
C:\Users\huawei\Desktop\CPM213 LAB\example assign. [Error] no match for 'operator<<' (operand types are 'std:basic_ostream<char>' and 'void')
65
CAll-arel h.unil DarltanlCDA712I AD
ENetelsandid-ter are
Line: 65
Col: 35
Sel: 0
Lines: 66
Length: 1244
Insert
Done parsing in 0 seconds
7:50 PM
IMI
DEV
O Type here to search
85°F Light rain
a 4)) ENG
16/12/2021
![C:\Users\huawei\Desktop\CPM213 LAB\example assignment.cpp - Dev-C++ 5.11
O X
File Edit Search View Project Execute Tools AStyle Window Help
TDM-GCC 4.9.2 64-bit Release
(globals)
Project Classes Debug
[*] ASSIGNMENT 1.cpp composition.cpp dynamic.cpp example assignment.cpp exp1.cpp exp6.cpp friendfunction.cpp Inheritance.cpp L2Q2.cpp L2Q3.cpp L2Q4.cpp L3Q1.cpp L3Q2.cpp L3Q3.cpp
1
#include <iostream>
2
3
using namespace std;
4
class student
6E {
private:
string name;
int matric;
public:
string getname (){return name;}
int getmatric(){return matric;}
void setStudent(string n, int m){name=n; matric=m;}
student(){}
-student(){}
};
class coursework: public student
18 E {
7
8
9.
10
11
12
13
14
15
16
17
private:
int test1;
19
20
int assignment1;
float cw_mark;
public:
int getTest()
{return test1;}
intgetAssg()
{return assignment1;}
float getcw()
{return cw_mark;}
void setdetail(string n, int mat, int T1, int assg1)
{
setStudent (n, mat);
test1=T1;
assignment1=assg1:
21
22
23
24
25
26
27
28
29
30 E
31
32
33
88 Compiler (113)
Resources dh Compile Log V Debug a Find Results
Close
Line
Col
File
Message
65
32
C:\Users\huawei\Desktop\CPM213 LAB\example assign. [Error] no match for 'operator<<' (operand types are 'std:basic_ostream<char>' and 'void')
65
CAIlearel huuil Derltan CDA712I AD
INetel andidtar e
Line: 65
Col: 35
Sel: 0
Lines: 66
Length: 1244
Insert
Done parsing in 0 seconds
7:49 PM
IMI
DEV
O Type here to search
85°F Light rain
a 4)) ENG
16/12/2021](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F26bcc706-1d6a-4c95-be9e-aef76f432780%2Fa214dd0b-c2f5-4994-bf23-e31683bb0bd2%2Fdxzyzv_processed.png&w=3840&q=75)
Transcribed Image Text:C:\Users\huawei\Desktop\CPM213 LAB\example assignment.cpp - Dev-C++ 5.11
O X
File Edit Search View Project Execute Tools AStyle Window Help
TDM-GCC 4.9.2 64-bit Release
(globals)
Project Classes Debug
[*] ASSIGNMENT 1.cpp composition.cpp dynamic.cpp example assignment.cpp exp1.cpp exp6.cpp friendfunction.cpp Inheritance.cpp L2Q2.cpp L2Q3.cpp L2Q4.cpp L3Q1.cpp L3Q2.cpp L3Q3.cpp
1
#include <iostream>
2
3
using namespace std;
4
class student
6E {
private:
string name;
int matric;
public:
string getname (){return name;}
int getmatric(){return matric;}
void setStudent(string n, int m){name=n; matric=m;}
student(){}
-student(){}
};
class coursework: public student
18 E {
7
8
9.
10
11
12
13
14
15
16
17
private:
int test1;
19
20
int assignment1;
float cw_mark;
public:
int getTest()
{return test1;}
intgetAssg()
{return assignment1;}
float getcw()
{return cw_mark;}
void setdetail(string n, int mat, int T1, int assg1)
{
setStudent (n, mat);
test1=T1;
assignment1=assg1:
21
22
23
24
25
26
27
28
29
30 E
31
32
33
88 Compiler (113)
Resources dh Compile Log V Debug a Find Results
Close
Line
Col
File
Message
65
32
C:\Users\huawei\Desktop\CPM213 LAB\example assign. [Error] no match for 'operator<<' (operand types are 'std:basic_ostream<char>' and 'void')
65
CAIlearel huuil Derltan CDA712I AD
INetel andidtar e
Line: 65
Col: 35
Sel: 0
Lines: 66
Length: 1244
Insert
Done parsing in 0 seconds
7:49 PM
IMI
DEV
O Type here to search
85°F Light rain
a 4)) ENG
16/12/2021
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education