Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Please I need a help with my first java class project

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Please I need a help with my first java class project

    Follow these guidelines to write a program that calculates a monthly cell phone bill.
    1. Declare the following named constants and use them in your code where appropriate:
    • _MONTHLY_PLAN = 39.99
    • _ALLOWABLE_MINUTES = 500
    • _ADDITIONAL_MINUTE_RATE = .45
    • _TEXT_MSG_PLAN = 15.00
    • _TEXT_MSG_RATE = .12
    • _DATA_PLAN = 20.00
    • _ALLOWABLE_DATA = 300
    2. Obtain the following information from the user:
    • _Minutes used (use an integer variable for input)
    • _Text messages sent/received (use an integer variable for input)
    • _Does customer have a text message plan (use a character variable for input; ask user to enter Y or N).
    • _Does customer have a data plan (use a character variable for input)
    • _If the customer has a data plan, ask for the amount of data used

    3. Compute the following:
    • _Cost of extra minutes used
    • _Cost of text messages (if user has a plan, this would be the plan cost; if no plan, each text sent/received is charged at the text message rate)
    • _Cost of data (if user has a plan, then ask for usage amount in megabytes; usage over 300 mg incurs an additional charge equal to the monthly rate; anything over 600 incurs a second additional charge, etc.
    • _The total bill (the monthly charge, charge for extra minutes, charge for text plan or messages, charge for data if applicable)

    4. Display the following output. All monetary values must be displayed to two decimal places. Output should be neatly formatted, similar to the samples provided.
    • _Cell phone usage summary, to include minutes used, text messages sent/received, data used (if applicable)
    • _Itemized cell phone charges summary, to include the cost of the monthly plan, the cost of the text message plan (if applicable), the cost of the data plan (if applicable), the cost of extra minutes used (if applicable), the cost of text messages (if applicable), the cost of extra data used (if applicable)
    • _Total charges

    Note: Do NOT combine steps 3 and 4 in your program. Do all calculations (and store the results in variables) before doing any output.
    A sample program run follows; the grading rubric is on the last page of this document.




    I don't know how to start could you please give me some hints.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    18,619
    Thanks
    45
    Thanked 1,958 Times in 1,932 Posts

    Default Re: Please I need a help with my first java class project

    Start by reading the tutorial on how to write a java program.
    What examples has your instructor given you?

    The instructions for the program seem pretty clear. Start with the first items in the list, write a few lines of code for them, compile them, fix the errors, compile again, fix again until no errors, then move on to the next items in the list.

    When you get problems you need help with, post your questions with the details about your problem.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Please I need a help with my first java class project

    how can I compute the cost of data??

  4. #4
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: Please I need a help with my first java class project

    Quote Originally Posted by kaboooot View Post
    how can I compute the cost of data??
    That is a very general question. I feel that if you elaborate on the question itself, you will find that as you break the question down into smaller questions, they eventually look like answers. Perhaps not. If the latter is the case please be more specific in your question.
    Norm give you some top shelf advice up there.
    ...write a few lines of code for them, compile them, fix the errors, compile again, fix again until no errors, then move on...
    I can not stress how golden that advice is.

  5. #5

    Default Re: Please I need a help with my first java class project

    It's Better if you take help of any java developers for your project, he/she'll assist you better regarding project.

  6. #6
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    3,412
    My Mood
    Mellow
    Thanks
    85
    Thanked 473 Times in 464 Posts

    Default Re: Please I need a help with my first java class project

    This thread is ~10 months old. I doubt it matters any more. That, and I don't really understand your advice.

Similar Threads

  1. Getting Class name from Method Name in a Java Project
    By Parikshit Chakraborty in forum Java SE APIs
    Replies: 4
    Last Post: July 26th, 2012, 08:54 PM
  2. Urgent Class Project Help !!!!!!!!!!!!!
    By thesoulpatchofBruce in forum What's Wrong With My Code?
    Replies: 4
    Last Post: April 10th, 2012, 05:14 AM
  3. Please help! Need help with class project!
    By eldeeb_hasan in forum What's Wrong With My Code?
    Replies: 7
    Last Post: April 10th, 2012, 12:30 AM
  4. [SOLVED] Project help...confusion with changing a getter/setter for a driver class
    By coolidge in forum Java Theory & Questions
    Replies: 1
    Last Post: September 30th, 2011, 11:08 PM
  5. [SOLVED] Return randomized String to other class in project
    By Fermen in forum Collections and Generics
    Replies: 2
    Last Post: February 16th, 2011, 04:36 PM