Kinda found a solution to my problem, so closed.
Results 1 to 17 of 17
Thread: C Programming
- 13 Dec. 2013 02:44pm #1
C Programming
Last edited by helldana; 15 Dec. 2013 at 01:43pm. Reason: Kinda found a solution to it.
- 13 Dec. 2013 05:07pm #2
- Join Date
- Apr. 2013
- Location
- Minnesota
- Posts
- 1,325
- Reputation
- 114
- LCash
- 0.66
I could show you in java, I'm not familiar enough with how c does pointers though.
https://discord.gg/TvN6xUb ~ chat on discord pls.
- 13 Dec. 2013 06:23pm #3
- 13 Dec. 2013 06:28pm #4
Oh darn, I'm only good at C and C++. I haven't tried other languages. ;C
But could you guys maybe, in an English language way of trying to explain what you guys would do?
- 13 Dec. 2013 07:21pm #5
- Join Date
- Apr. 2013
- Location
- Minnesota
- Posts
- 1,325
- Reputation
- 114
- LCash
- 1.32
https://discord.gg/TvN6xUb ~ chat on discord pls.
- 13 Dec. 2013 08:18pm #6
C doesn't use classes. Only structs.
I'm lightning on my feet
- 14 Dec. 2013 03:30am #7
So as to what Kingz suggested, I should use a structure and then do the math and file processing?
I was wondering though at first, how do you really record the customer's information? Do I need to make my own file of the customer or can the customer input it themselves?
- 14 Dec. 2013 03:39am #8
- Join Date
- Apr. 2013
- Location
- Minnesota
- Posts
- 1,325
- Reputation
- 114
- LCash
- 0.77
The specs seem to lead to the assumption of having them input and storing the customer data in a struct.
https://discord.gg/TvN6xUb ~ chat on discord pls.
- 14 Dec. 2013 03:42am #9
- 14 Dec. 2013 04:52am #10
This is a pretty cool one.
So first of all, could you provide us with the official documentation your class gives you on the project?
You can record the customer information through using iostream for basic console input and output, or you could use file processing to enter a user's information (such as call duration and dates) in a file and then read it from the file.
I would recommend using basic input and output functionality.
I'd organized this program like a control panel.
Ask for the user's name and personal information (the stuff it shows in the sample) and then ask for how many calls they made, on which days, at what time, and how long they called for.
Then do some calculations to figure out the rates and finally store ALL that information in a neatly formatted text file.
I'd recommend using proper variable scoping for this one.Last edited by Isonyx; 14 Dec. 2013 at 05:04am.
I don't get tired.
- 14 Dec. 2013 05:19am #11
- 14 Dec. 2013 07:48am #12
I don't really have the time to code the program.
But yeah, you could do it that way.
A few things when calculating charges.
- The Phone Rental will always be charged.
- When it talks about "different operators" I'm not quite sure what it's referring to.
- Allow the user to choose 1G or 4G when setting up user options.
- At some point before calculating the charges figure out whether the user is charging on the 0700 to 1900 section or the 1901 to 0659 section. Then use those two options.
Also with user configuration options you'll also need to read the user's call time (which looks to be logged in...military time) AND the duration.
If you can't wrap your head around the coding behind basic input and output you're going to have some problems.
All in all, it'll just take a little bit of time. Ask us if you need help with a specific topic and we can recommend some techniques.
You can start with this Simple I/O tutorial.
And here's one on file processing.I don't get tired.
- The Phone Rental will always be charged.
- 14 Dec. 2013 07:57am #13
- 14 Dec. 2013 08:26am #14
- 14 Dec. 2013 08:34am #15
- 01 Jan. 2014 03:51pm #16
- 01 Jan. 2014 05:38pm #17