*MAFIA* Forums

*MAFIA* Forums

  • March 28, 2024, 04:25:14 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome back the Arcade! Play over 100+ games to get the high score and compete against other forum members.

http://www.mafiaowns.com/index.php?action=arcade;sa=list;sortby=a2z;

Author Topic: programming help  (Read 5482 times)

*MAFIA* Vanilla

  • *MAFIA* Member
  • Forum Member
  • Reputation: 650
  • Offline Offline
  • Posts: 687
    • View Profile
programming help
« on: April 12, 2009, 08:22:18 PM »

Group Project
12. Using Files—Travel Expenses
This program should be designed and written by a team of students. Here are some suggestions:
One student should design function
main
, which will call the other functions in the pro-gram. The remainder of the functions will be designed by other members of the team.
The requirements of the program should be analyzed so each student is given about the same work load.
The names, parameters, and return types of each function should be decided in advance.
Stubs and drivers should be used to test and debug the program.
The program can be implemented either as a multi-file program, or all the functions can be cut and pasted into the main file. Here is the assignment: Write a program that calculates and displays the total travel expenses of a business person on a trip. The program should have functions that ask for and return the following:
The total number of days spent on the trip
The time of departure on the first day of the trip, and the time of arrival back home on the last day of the trip
The amount of any round-trip airfare
The amount of any car rentals
Miles driven, if a private vehicle was used. Calculate the vehicle expense as $0.38 per mile.
Parking fees (The company allows up to $6 per day. Anything in excess of this must be paid by the employee.)
Taxi fees, if a taxi was used anytime during the trip (The company allows up to $10 per day for each day a taxi was used. Anything in excess of this must be paid by the employee.)
Conference or seminar registration fees
Hotel expenses (The company allows up to $90 per night for lodging. Anything in excess of this must be paid by the employee.)
The amount of
each
 meal eaten. On the first day of the trip, breakfast is allowed as an expense if the time of departure is before 7 a.m. Lunch is allowed if the time of departure is before noon. Dinner is allowed if the time of departure is before 6 p.m. On the last day of the trip, breakfast is allowed if the time of arrival is after 8 a.m. Lunch is allowed if the time of arrival is after 1 p.m. Dinner is allowed if the time of arrival is after 7 p.m. The program should only ask for the amounts of allowable meals. (The company allows up to $9 for breakfast, $12 for lunch, and $16 for dinner. Anything in excess of this must be paid by the employee.)The program should perform the necessary calculations to determine the total amount spent by the business traveler in each category (mileage charges, parking, hotel, meals, etc.) as well as the maximum amount
allowed
 in each category. It should then create a well laid out expense report that includes the amount spent and the amount allowed in each category, as well as the total amount spent and total amount allowed for the entire trip. This report should be written to a file.
Input Validation: Do not accept negative numbers for any dollar amount or for miles driven in a private vehicle. Do not accept numbers less than 1 for the number of days. Only accept valid times for the time of departure and the time of arrival.



ok that is my assignment, i have to take care of the food.
i am stumped on what to do, i have figured out the other stuff but my group decided to give me the work load on what to do for the food.
any pointers on how i can get the program to calculate the food
Logged
[

*MAFIA* Dune Surfer

  • *MAFIA* Admin
  • Forum Member
  • Reputation: 1649
  • Offline Offline
  • Posts: 2,303
    • View Profile
!!
« Reply #1 on: April 13, 2009, 11:51:41 AM »

BORING!!! SELF KILL!!!!!!
Logged

*MAFIA* Beatlejuice

  • *MAFIA* Head
  • Forum Member
  • Reputation: 2313
  • Offline Offline
  • Posts: 8,317
    • View Profile
Re: programming help
« Reply #2 on: April 13, 2009, 12:30:08 PM »

Did you type all that yourself?  So basically you need to design a computer program that calculates food?  Ouch...
Logged

*MAFIA* Vanilla

  • *MAFIA* Member
  • Forum Member
  • Reputation: 650
  • Offline Offline
  • Posts: 687
    • View Profile
Re: programming help
« Reply #3 on: April 13, 2009, 01:13:22 PM »

yes i am having a hard time with this stupid thing, so if anyone knwos just a way that i can start off that would be great help.
Logged

*MAFIA* Balthazar

  • *MAFIA* Head
  • Forum Member
  • Reputation: 2654
  • Offline Offline
  • Posts: 2,412
    • View Profile
Re: programming help
« Reply #4 on: April 13, 2009, 01:24:21 PM »

I'll take a look at this when I get home this evening. See if I can help.
Logged

*MAFIA* Vanilla

  • *MAFIA* Member
  • Forum Member
  • Reputation: 650
  • Offline Offline
  • Posts: 687
    • View Profile
Re: programming help
« Reply #5 on: April 13, 2009, 03:47:19 PM »

sweet, i just need to figure out the food part of it, the other stuff has been worked, i am just having some trouble doing the food. i know what i want it to do or at least i think i know but i don't know how to do it in C++
Logged

*MAFIA* Bonehead

  • *MAFIA* Founder
  • Forum Member
  • Reputation: 2584
  • Offline Offline
  • Posts: 8,007
    • View Profile
    • *MAFIA*
Re: programming help
« Reply #6 on: April 13, 2009, 03:51:35 PM »

does it all have to be in c++? if not you can use a java call and let it do the food, and you can use, mod one of the hundreds already made :D
Logged

*MAFIA* Balthazar

  • *MAFIA* Head
  • Forum Member
  • Reputation: 2654
  • Offline Offline
  • Posts: 2,412
    • View Profile
Re: programming help
« Reply #7 on: April 13, 2009, 06:22:28 PM »

I took a look at the outline but I am in the same boat as Bone, my C syntax isn't up to par. I studied VB, VB.NET, ASP, and a little PHP and Java.

I can help with a VB.NET source and we can work through translating it to C?
Logged

*MAFIA* Vanilla

  • *MAFIA* Member
  • Forum Member
  • Reputation: 650
  • Offline Offline
  • Posts: 687
    • View Profile
Re: programming help
« Reply #8 on: April 13, 2009, 06:56:52 PM »

ya it has to be C++, that is what we have to run though the main function, we haven't learned java yet that is next semester.
Logged

*MAFIA* Vanilla

  • *MAFIA* Member
  • Forum Member
  • Reputation: 650
  • Offline Offline
  • Posts: 687
    • View Profile
Re: programming help
« Reply #9 on: April 13, 2009, 07:00:08 PM »

i am not sure what that is but if it helps then we can try, i can't try tonight but i can try maybe tmoorrow. its pretty basic C, its programming one and its not through the whole book yet. i'll see what i can do to night and then hit this back tomorrow. ,thanks
Logged

*MAFIA* Bonehead

  • *MAFIA* Founder
  • Forum Member
  • Reputation: 2584
  • Offline Offline
  • Posts: 8,007
    • View Profile
    • *MAFIA*
Re: programming help
« Reply #10 on: April 14, 2009, 03:42:26 PM »

oh no, i know c++ but. what he wants, would be easier. if a java/e rudimentary was in a php called function. then he could call ie to decode and process the information, whether it be, rudimentary, or a called stable :D
Logged

LAAZ

  • Forum Member
  • Reputation: 709
  • Offline Offline
  • Posts: 910
    • View Profile
Re: programming help
« Reply #11 on: April 14, 2009, 06:47:55 PM »

If only programmar_1 was still around he would answer all these questions like chrisdaniggaz also, ina nutshell BALTH AND BONE dont know shit when it comes to programming no one ask these pair of fucking idiots! Fuck u whitey hijo de puta (Balth), and PUTO TIMBON (bunhead).  :'( :'( :'( :evil: :evil: :evil: :angel: :angel: :angel: :angel: :angel: :angel: :angel: :confused: :confused:
« Last Edit: April 14, 2009, 06:51:29 PM by LAAZ »
Logged

*MAFIA* Bonehead

  • *MAFIA* Founder
  • Forum Member
  • Reputation: 2584
  • Offline Offline
  • Posts: 8,007
    • View Profile
    • *MAFIA*
Re: programming help
« Reply #12 on: April 14, 2009, 07:29:42 PM »

you got it i don't know shit!!!

oh btw MFS was custom made by me :D if you want the code i am happy to share :P

its in machine format and no comments, the only way to go :D
Logged

LAAZ

  • Forum Member
  • Reputation: 709
  • Offline Offline
  • Posts: 910
    • View Profile
Re: programming help
« Reply #13 on: April 14, 2009, 09:21:43 PM »

Calmate cabron i was only joking u are the shiznit!!!!!!!!! :o :o :o
Logged

HaVoK

  • Forum Member
  • Reputation: 636
  • Offline Offline
  • Posts: 653
  • Gone
    • View Profile
Re: programming help
« Reply #14 on: April 16, 2009, 02:39:47 PM »

Are you reading all of this data from a file and then processing costs based on how much the food was and when you ate or do you need to set up a dialog that goes through the days and asks what time and how much they spent?

I can possibly help you out with this but it is incredibly vague...
Logged
 

Page created in 0.038 seconds with 30 queries.