Kinda found a solution to my problem, so closed.
Printable View
Kinda found a solution to my problem, so closed.
I could show you in java, I'm not familiar enough with how c does pointers though.
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? :C
C doesn't use classes. Only structs.
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?
The specs seem to lead to the assumption of having them input and storing the customer data in a struct.
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.
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.
The part where it said to different operators is like to a different telecommunication company(or sumthin like that).
Eg. AT&T to Verizon.
Should I ask the user to input the time he/she makes the call and the duration of it?
And yes I'm pretty adept at input/output.