Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Feb 2014
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Question Programming in C++ (Use Classes or not?)

    Brainstorming a program that I want to create. Problem is, I am torn between whether or not I should use classes, or just use an array. The program is going to take a bill that you receive, and will be able to do things such as do a few computations to determine how long before the bill is paid off, as well as total how much debt that you were in and a lot of other things. When it is completed, it will also take an amount you have put in within a paycheck, and will be able to give you suggestions on what bill you should pay, and how much, so that you can have assistance on clearing your bill.

    Should I use a class for the bills? Opinions please.

    Once again, this is not a school project, this is a programming I have been brainstorming for myself.

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    If you are using C++ then you should be using classes since if you are not using any classes then you may as well write in C instead.

    You have identified quite a few methods for your bill and payment classes in the question you have asked.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • Users who have thanked felgall for this post:

    karichie (02-07-2014)

  • #3
    New Coder
    Join Date
    Aug 2013
    Posts
    38
    Thanks
    1
    Thanked 6 Times in 6 Posts
    I am curious as of how you would use arrays to model the bill. Can you explain it or give a small example?

  • Users who have thanked hBGl for this post:

    karichie (02-07-2014)

  • #4
    New Coder
    Join Date
    Feb 2014
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Exclamation

    I chose to do it with classes. Now, trying to get the classes to work as I need them to. Please keep an eye out on posts for questions that I have. I know I will have a lot.


  •  

    Tags for this Thread

    Posting Permissions

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