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 3 of 3

Thread: Please can somebody help me ASAP

  1. #1
    Junior Member
    Join Date
    Nov 2017
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Please can somebody help me ASAP

    I have to do this work but i do not understand Java coding please can somebody help me with:

    Step 2: A basic Website class
    a) Write a basic Website class to represent the web site. The constructor for the class should be passed the name of the website which will typically be "Club 18", "Centre Parks" or "Club Silver" and which should be saved in a field. A second field hits should record the number of browsers who logged into the website and a third field salesTotal should record the amount of money taken at the checkout.

    b) Write a method for the class, called memberLogin(), which allows a member to log in to the site. This method is passed a Member object as a parameter and which
    i) uses the member's setLoginStatus() method to "log in" that member to the website;
    ii) outputs a welcome message to a terminal window in the format
    Club 18 welcomes member 6732, you are now logged in
    c) Now write a memberLogout() method.

    Step 3: Add a basic Holiday class and allow a member to select a holiday.
    a) Write a basic Holiday class to represent a holiday. A Holiday object has three fields: refNo (a unique sequence of letters and digits), type (e.g. "beach", "touring") and price (the price of the holiday in pounds per person). The constructor for the class should be passed suitable arguments to initialise the three fields.
    b) Add a selectHoliday() method to the Member class which allows a member to choose a holiday provided the user is logged into the appropriate website. This method is passed a Holiday object as a parameter. You should declare a new field holiday in the Member class in order to store the holiday selected.
    c) Make the selectHoliday() method print a message to a terminal window similar to this one
    Member 6732 has selected holiday ref number W1473, a touring holiday at £550 per person.

  2. #2
    Member
    Join Date
    Aug 2017
    Location
    Northern Ireland
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Please can somebody help me ASAP

    This is clearly homework, which is not for anyone else to do but you.

    You say "I do not understand Java coding", which is curious because the fact that you have been given homework implies that you are enrolled on a Java programming course. So either you didn't pay attention at all, or you didn't attend.

    Perhaps start with showing us how far you've gotten with it so far and go from there.
    Tim Driven Development

  3. #3
    Member
    Join Date
    Dec 2013
    Location
    Honolulu
    Posts
    83
    Thanks
    1
    Thanked 4 Times in 2 Posts

    Default Re: Please can somebody help me ASAP

    This sounds like a basic outline of a website and the container or elements that go into your website. Why don't you try drawing it out, then seeing where each class fits in your API. Which ever of the kits you're using. It should show a diagram of boxes, and then show a tree like structure from parent to child, and a solid line being drawn to a parent class and a child class. So the whole diagram should be a schematic diagram of boxes and lines. Try drawing these boxes out and lines. It should show attributes and behaviors and the box. Writing those in the box. Such as, this method being a behavior. planetHollywood() goes in one box.

Similar Threads

  1. NEED HELP ASAP PLEASE
    By jaisan72980 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: November 13th, 2011, 11:29 AM
  2. Need help!!! Asap PLEASE!!!!
    By choloboy in forum What's Wrong With My Code?
    Replies: 5
    Last Post: November 11th, 2011, 06:28 AM
  3. Need help ASAP!!!!
    By Swiper in forum What's Wrong With My Code?
    Replies: 9
    Last Post: August 12th, 2011, 06:41 PM
  4. NEED HELP ASAP!!
    By JavaStudent_09 in forum What's Wrong With My Code?
    Replies: 7
    Last Post: August 18th, 2010, 07:33 PM
  5. NEED HELP ASAP PLEASE!!!
    By mbm4ever in forum What's Wrong With My Code?
    Replies: 8
    Last Post: August 12th, 2010, 07:01 PM