473,386 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

can someone explain this class problem to me?

I'm having a hard time understanding objects and classes...this is the problem...Define a class named Movie with private fields for the title, year, and name of the director. Include public member functions. Write a program that declares an instance of the Movie class called myFavorite. Prompt the user and the member fields (properties), then display the properties to std out.

all i have are the prototypes which are:

void Movie:: setTitle(cstring);
void Movie::setYear(int);
void Movie::setDirector(string);
void Movie::displayMovie();

i havent worked with cstrings in a long long time and i am confused where to start now
Feb 25 '08 #1
1 1293
Studlyami
464 Expert 256MB
first i would read a tutorial or two on classes (Here's one for you). Then i would create the class structure where you declare the class then the functions and variable of that class. Then i would write the class functions. If you don't understand something specific about the tutorial (or any tutorial) or you get stuck on something else post up exactly what problem your running into and as always, the code associated with it.
Feb 25 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

21
by: Gactimus | last post by:
Can anyone explain what the lines with the '*' by them do? ----------- #ifndef _COUNTER_H #define _COUNTER_H #include <iostream> using namespace std; class Counter
12
by: you | last post by:
I may be just stupid, but I don't understand the point of using an Interface. I am going through a couple of books at the moment trying to teach myself a little vb.net. Just for the heck of...
10
by: Jeff Boes | last post by:
I'm hoping there's someone here with experience in building the Visual Explain tool from Red Hat. I downloaded it and the J2 SDK, but when I attempt to follow the build instructions, I get messages...
9
by: M. Posseth | last post by:
i have 3 forms Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim frm As New Form2 frm.Show(Me) End Sub...
3
by: Aarti | last post by:
Hi, Can some one please explain why the output of this program is 15 #include <iostream> using namespace std; class A {
4
by: stiki | last post by:
How and what does this mean in php: ($this->varname) I can't seem to find this by searching Google, because the "->" are removed from my search query. Cheers, Igor Terzic www.stikimedia.com
3
by: Angus | last post by:
Wondering how this code worked I have a base class called eg MyBase. It has a private member called myprivatemember which is of course not accessible from users of the class. But I suddenly...
0
by: Marcus Low | last post by:
Duh, Ok here is the file again ...attached. I give up doing this via the email editor. Sorry! new to the mailing list. Marcus Marcus Low wrote:
1
by: Marcus Low | last post by:
Can someone explain to me, why the behaviour below is different when u remark "lister" and unremark "self.lister"? #-------------------------------------------------------------- class abc : #...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.