menu
Qamnty
Login
Register
My account
Edit my Profile
Private messages
My favorites
Write the header file (.h file) of a class acc2 containing: a data member named sum of type int. a constructor accepting no parameters. a function named getsum that accepts no p…
Ask a Question
Questions
Unanswered
Tags
Ask a Question
Write the header file (.h file) of a class acc2 containing: a data member named sum of type int. a constructor accepting no parameters. a function named getsum that accepts no p…
asked
Nov 2, 2023
30.4k
views
4
votes
write the header file (.h file) of a class acc2 containing: a data member named sum of type int. a constructor accepting no parameters. a function named getsum that accepts no parameters and returns an int.
Computers & Tech
high-school
Wyatt Barnett
asked
by
Wyatt Barnett
8.1k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
5
votes
// acc2.h
// c++ class header for acc2
class acc2
{
public:
// getsum()
int getsum()
{
return sum_;
}
// Default constructor
acc2()
{
sum_ = 0;
}
private:
int sum_;
}
SuperM
answered
Nov 8, 2023
by
SuperM
8.6k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Sep 18, 2020
117k
views
Write a full class definition for a class named Acc2, and containing the following members: A data member named sum of type integer. A constructor that accepts no parameters. The constructor initializes
Komal Bansal
asked
Sep 18, 2020
by
Komal Bansal
7.7k
points
Computers & Tech
college
2
answers
5
votes
117k
views
asked
Apr 7, 2024
230k
views
Which of the following function prototypes is illegal? A. int getSum(int y, int z, int*); B. int getSum(int[ ], int y, *k); C. int getSum(int z, int k = 4); D. int getSum(int[10]);
Manjesh V
asked
Apr 7, 2024
by
Manjesh V
8.1k
points
Computers & Tech
high-school
1
answer
2
votes
230k
views
asked
Dec 25, 2020
76.5k
views
Write a class definition of a class named 'Value' with the following: a constructor accepting a single integer parameter a constructor with no parameters a method 'setVal' that accepts a single parameter,
Aretha
asked
Dec 25, 2020
by
Aretha
8.6k
points
Computers & Tech
high-school
1
answer
2
votes
76.5k
views
Ask a Question
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.
Categories
All categories
Mathematics
(3.7m)
History
(955k)
English
(903k)
Biology
(716k)
Chemistry
(440k)
Physics
(405k)
Social Studies
(564k)
Advanced Placement
(27.5k)
SAT
(19.1k)
Geography
(146k)
Health
(283k)
Arts
(107k)
Business
(468k)
Computers & Tech
(195k)
French
(33.9k)
German
(4.9k)
Spanish
(174k)
Medicine
(125k)
Law
(53.4k)
Engineering
(74.2k)
Other Questions
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qamnty