10 Replies - 1133 Views - Last Post: 02 December 2009 - 02:42 PM Rate Topic: -----

#1 xinvux  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 07-October 09

Can someone point me in the right direction?

Post icon  Posted 25 November 2009 - 07:31 PM

hi, my professor recently assigned a programming assignment in which i have to implement a cash card-laundry room operation system including a VTM, washers, dryers, and money cards. i'm suppose to define 4 classes for VTM, washer, dryer and money card individually. the VTM should only accept $1, $5, $10, and $20 bills and adds 10% for $10 bills, 15% for $20 bills. washer takes $1.25 for each load and dryer takes $.35 for 10 minutes.
after the card is used, i need to print the balance of VTM, the card, washer and dryer.

i have no idea how to start this. i'm not asking for codes or anything but can someone point me in the direction as to how to start approaching this problem??

any help is appreciated! thanks in advance!

Is This A Good Question/Topic? 0
  • +

Replies To: Can someone point me in the right direction?

#2 Aphex19  Icon User is offline

  • Born again Pastafarian.
  • member icon

Reputation: 615
  • View blog
  • Posts: 1,873
  • Joined: 02-August 09

Re: Can someone point me in the right direction?

Posted 25 November 2009 - 07:51 PM

For this you clearly need some understanding of classes, I could help you out if you wanted.

Also, excuse me for being dense, but what is a VTM? I have searched but I cant find anything on it.

This post has been edited by Aphex19: 25 November 2009 - 08:21 PM

Was This Post Helpful? 0
  • +
  • -

#3 thinktank!  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 25-November 09

Re: Can someone point me in the right direction?

Posted 25 November 2009 - 07:59 PM

View Postxinvux, on 25 Nov, 2009 - 06:31 PM, said:

hi, my professor recently assigned a programming assignment in which i have to implement a cash card-laundry room operation system including a VTM, washers, dryers, and money cards. i'm suppose to define 4 classes for VTM, washer, dryer and money card individually. the VTM should only accept $1, $5, $10, and $20 bills and adds 10% for $10 bills, 15% for $20 bills. washer takes $1.25 for each load and dryer takes $.35 for 10 minutes.
after the card is used, i need to print the balance of VTM, the card, washer and dryer.

i have no idea how to start this. i'm not asking for codes or anything but can someone point me in the direction as to how to start approaching this problem??

any help is appreciated! thanks in advance!


A good starting place is to write out your math steps. This will help you see what you need to do to fit the steps into code. Then think of the questions you would want to be asked or prompted as a user. I know I am just a beginner, but when I had a math based question like this in class, it helped me a great deal to see the steps needed in solving the math problem, then using pseudocode, then converting to language...in my case c++.
Was This Post Helpful? 0
  • +
  • -

#4 xinvux  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 07-October 09

Re: Can someone point me in the right direction?

Posted 26 November 2009 - 12:43 PM

View PostAphex19, on 25 Nov, 2009 - 06:51 PM, said:

For this you clearly need some understanding of classes, I could help you out if you wanted.

Also, excuse me for being dense, but what is a VTM? I have searched but I cant find anything on it.


yes please help me!!

VTM is value transfer machine
Was This Post Helpful? 0
  • +
  • -

#5 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6066
  • View blog
  • Posts: 23,526
  • Joined: 23-August 08

Re: Can someone point me in the right direction?

Posted 26 November 2009 - 12:54 PM

Start small by designing on paper the various classes you need to implement.
Was This Post Helpful? 0
  • +
  • -

#6 cplusminus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 02-December 09

Re: Can someone point me in the right direction?

Posted 02 December 2009 - 01:47 PM

has anyone figured this one out?
Was This Post Helpful? 0
  • +
  • -

#7 ccubed  Icon User is offline

  • It's That Guy
  • member icon

Reputation: 160
  • View blog
  • Posts: 1,403
  • Joined: 13-June 08

Re: Can someone point me in the right direction?

Posted 02 December 2009 - 01:54 PM

View Postcplusminus, on 2 Dec, 2009 - 12:47 PM, said:

has anyone figured this one out?


We're not going to give the code. It's not really that complicated if you understand classes.
Was This Post Helpful? 0
  • +
  • -

#8 cplusminus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 02-December 09

Re: Can someone point me in the right direction?

Posted 02 December 2009 - 02:09 PM

im so lost, is this right for the washer?

class washer
{
public:
	// Cost of Total Loads
	double washerLoads;

	// Construct a default number of loads
	washer()
	{
		washerLoads = 1.25;
	}

	// Construct a washer load amount
	washer(double newwasherLoads)
	{
		washerLoads = newwasherLoads;
	}

	// Return cost of Loads
	double washerCost()
	{
		return washerLoads * 1.25;
	}
};

Was This Post Helpful? 0
  • +
  • -

#9 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6066
  • View blog
  • Posts: 23,526
  • Joined: 23-August 08

Re: Can someone point me in the right direction?

Posted 02 December 2009 - 02:12 PM

Where are you getting 1.25 requirement for "number of loads"? That's a cost per load, isn't it?
Was This Post Helpful? 0
  • +
  • -

#10 cplusminus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 02-December 09

Re: Can someone point me in the right direction?

Posted 02 December 2009 - 02:17 PM

since i am trying to calculate the total cost, i want the user to input the number of loads have that multiplied by 1.25
Was This Post Helpful? 0
  • +
  • -

#11 cplusminus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 02-December 09

Re: Can someone point me in the right direction?

Posted 02 December 2009 - 02:42 PM

can someone please help, this is what i got for dryer, am i at least on the right track?


class dryer
{
public:

	double minutes;

	dryer()
	{
		minutes = 10;
	}

	dryer(double newminutes)
	{
		minutes = newminutes;
	}

	double getCost()
	{
		return (minutes  / 10) * 0.35;
	}
}; 


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1