CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2011
    Posts
    2

    Unhappy Need help with my college project please.. I'm lost..

    My professor doesn't really know how to teach and he teaches really fast.. I just cannot keep up with him. I took a beginners class for C++ and I did well, but now I'm just lost and frustrated that I cannot understand most of the things hes saying..
    This is the first project that he asked us to do.. so I need some major help with this..if anyone willing to help me do it that would be wonderful!

    Write a program that uses a class. The class definition will be in a separate header file.See documents "Example of class using separate header file" and "header file "as a guide. You will also need to make a file for data (such as employee.dat). See document "Writing to a file" on how to write to a file.The class should have private data members name, salary, years, evaluation score (which can be 1 to 10).The function members should be able to output and modify these data members.Your program should take the name, salary, years, evaluation score from the keyboard and put it into employee.dat.Then if evaluation score is greater than 8, give the person a 1% raise for every year they have worked for the company (4 yrs gets a 4% raise). If evaluation score is less than 3, 10% reduction in salary. Your program should be able to read from the data file and assign raises. Your finished product will therefore have 3 files: the application, the header (class definition), and data file. Your program should compile and run.


    I'm trying to work on it as I'm posting this right now.. Hopefully by the time I get back on this forum I'd already figure it out by myself.
    Thank you very much for your help in advance! Much appreciated.

  2. #2
    Join Date
    Mar 2011
    Posts
    2

    Re: Need help with my college project please.. I'm lost..

    BUMP
    anyone?

  3. #3
    Join Date
    Nov 2008
    Location
    England
    Posts
    748

    Re: Need help with my college project please.. I'm lost..

    Get Microsoft Visual C++ Express here or CodeBlocks here.
    Get STLFilt here to radically improve error messages when using the STL.
    Get these two can't live without C++ libraries, BOOST here and Loki here.
    Check your code with the Comeau Compiler and FlexeLint for standards compliance and some subtle errors.
    Always use [code] code tags [/code] to make code legible and preserve indentation.
    Do not ask for help writing destructive software such as viruses, gamehacks, keyloggers and the suchlike.

  4. #4
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Need help with my college project please.. I'm lost..

    Quote Originally Posted by stateofemergency View Post
    My professor doesn't really know how to teach
    What does the teacher do that makes you believe he/she doesn't know how to teach? Programming is not for everyone, regardless of how good a teacher in programming may be, or how smart the student may be.
    and he teaches really fast..
    I'll let you in on a secret -- one reason why programming teachers teach "fast" and do not slow down for others is to quickly weed out the ones that cannot understand the material. Computer programming requires a brain that's wired in a certain way -- the person has to, from nothing, create something that consists of logical, discrete, well-defined steps. If they can't do that, then there's nothing a teacher can do to teach that, regardless of how smart the person may be in other topics. The teachers know this, and won't bother slowing down for these students.
    Write a program that uses a class. The class definition will be in a separate header file.See documents "Example of class using separate header file" and "header file "as a guide. You will also need to make a file for data (such as employee.dat). See document "Writing to a file" on how to write to a file.The class should have private data members name, salary, years, evaluation score (which can be 1 to 10).The function members should be able to output and modify these data members.Your program should take the name, salary, years, evaluation score from the keyboard and put it into employee.dat.Then if evaluation score is greater than 8, give the person a 1% raise for every year they have worked for the company (4 yrs gets a 4% raise). If evaluation score is less than 3, 10% reduction in salary. Your program should be able to read from the data file and assign raises. Your finished product will therefore have 3 files: the application, the header (class definition), and data file. Your program should compile and run.
    I see nothing in that description that would be difficult for a beginner who

    1) has the aptitude to write a computer program and

    2) who puts in the time to do the work.

    What exactly are you having trouble with? Instead of looking at the whole assignment as one big blob, take the very first thing mentioned and attempt to write a small program that does that.

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; March 31st, 2011 at 06:59 PM.

  5. #5
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Need help with my college project please.. I'm lost..

    The class definition will be in a separate header file
    The class should have private data members name, salary, years, evaluation score (which can be 1 to 10).The function members should be able to output and modify these data members
    So have you done these steps? It should take no more than 5 minutes work for a student, a minute's work for an experienced programmer.

    Regards,

    Paul McKenzie

  6. #6
    Join Date
    Jan 2011
    Location
    Orange County, CA
    Posts
    82

    Re: Need help with my college project please.. I'm lost..

    Quote Originally Posted by stateofemergency View Post
    I took a beginners class for C++ and I did well, but now I'm just lost and frustrated that I cannot understand most of the things hes saying..
    wait, i learned how to do this stuff IN a begginners C++ book within the first four chapters, what exactly dont you know how to do??
    --and that might be why he's going "so fast", you're probably already suppose to know this...

  7. #7
    Join Date
    May 2009
    Posts
    2,413

    Re: Need help with my college project please.. I'm lost..

    Quote Originally Posted by stateofemergency View Post
    BUMP
    anyone?
    This is just a simple warm-up exercise to set the stage for the rest of the laboratory course-work.

    You're supposed to be able to,

    - produce a small program with a simple logic,
    - compile and run it,
    - introduce a class in the standard C++ way by splitting it into a .h and a .cpp file,
    - read from the keyboard and write to the screen, and
    - store and retrieve information from a file.

    This is the bare minimum for doing anything in C++ really. It's essentially unrelated to whatever the professor may have been talking about in his lectures. So if you've had trouble understanding him it's a problem of its own but it shouldn't prevent you from completing this very trivial programming task. Especially not since you've already completed a beginner's C++ course. And especially not with all the complementary material you've been handed. And especially not since you've been admitted to a university and should be able to read and understand written instructions.

    You cannot expect further pampering and spoonfeeding. You got to get down to producing something of your own. If you get stuck you're wellcome to ask specific questions. Good luck.
    Last edited by nuzzle; April 1st, 2011 at 07:20 PM.

  8. #8
    Join Date
    May 2009
    Posts
    2,413

    Re: Need help with my college project please.. I'm lost..

    As has been suggested you must ask yourself whether programming suits you.

    Programming is very much a craft and the only way to improve yourself is by actually writing programs. It's a hell of a struggle really. Your own program logic usually is a piece of cake but no program runs in isolation. To be successful you also must be willing to browse through tons of badly documented third-party API:s or code some moron wrote, for days and weeks and months at end to finally resolve the issues at hand.

    In short, it takes an introvert of the third kind (like me ) to put up with this whole hulabaluba. You should seriously consider whether this is something for you.
    Last edited by nuzzle; April 1st, 2011 at 08:11 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured