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

Thread: Please friends help me out with this assignment question

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

    Question Please friends help me out with this assignment question

    Overview:
    BeRewarded is a company that runs a rewards program for their customers. When customers
    purchase items they earn rewards points. Customers can then use these points to redeem gifts.
    BeRewarded are planning to release a new version of software to provide this functionality and
    you have been hired to write it in Java.
    Below are the requirements of the software:
    Getting Started:
    1. Create a new project in BlueJ called Assignment1. All classes for the assignment are to be
    saved in this project.
    2. Create the required classes for the project - there should be at least three (3) classes:
    Customer, Item and Gift. You can have any number of additional classes you think are
    required.
    3. Class basics:
    Customer a customer has a name and email address. They also have a points balance,
    cash balance and totals for the number of items that have been purchased and redeemed.
    Item an item is something a customer can purchase. It has a name, description, price and
    availability. It also has an attribute for the number of bonus points a customer can earn (see
    below for more details)
    Gift a gift is something a customer can redeem. It has a name, description and
    availability. It also has a points value i.e. a customer must have this number of points to be
    able to redeem it (see below)
    4. Constructors: all classes must have at least 1 alternate constructor that accepts input
    parameters used to initialise the class attributes (done in the body of the constructor).
    Functionality:
    The software must provide these functions:
    - Update (change) the price, description, availability and bonus points for an Item
    - Update (change) the description, availability and points for a Gift
    - Update (change) the email address, points balance and cash balance for a Customer
    - Update (change) the total number of items purchased and the total number of
    redemptions for a Customer
    - Calculate the points value for an Item
    - Customers can purchase an Item
    - Customers can redeem gifts
    - Report on which customers are VIP customers
    NOTE: It is expected that if an error occurs e.g. if a customer does not have enough money to
    purchase an item, then the system will display an appropriate error message. This applies for all
    common errors.
    Detailed Functionality:
    1. Update (change) the price, description, availability and bonus points for an Item
    It must be possible to update the price, description, availability and bonus points for an
    Item. This should be done in four separate methods.
    2. Update (change) the description, availability and points for a Gift
    It must be possible to update the description, availability and points for a Gift. This should
    be done in three separate methods.
    3. Update (change) the email address, points balance and cash balance for a Customer
    It must be possible to update the email address, points balance and cash balance for a
    Customer. This should be done in three separate methods.
    4. Update (change) the total number of items purchased and the total number of redemptions
    for a Customer
    It must be possible to update the total number of items purchased, and the total number of
    redemptions. This should be done in two separate methods.
    5. Calculate points value for an Item
    Reward points are allocated to a customer when they purchase an item. The number of
    points depends on the price of the item according to the following rules:
    $0.01 - $9.99 = 1 point
    $10.00 - $19.99 = 3 points
    $20.00 - $49.99 = 6 points
    $50.00 and over = 9 points
    The method to calculate this should be part of the Item class.
    6. Purchase an Item
    Customers can purchase an item if they have enough cash and the item is available. If the
    purchase is successful the points value of the item (this is a calculated value) is added to
    the points balance for the customer. The price of the item must be deducted from the cash
    balance for the customer. The total number of items purchased by the customer must also
    be updated at this time. If the item purchased has a non-zero amount for bonus points,
    these bonus points are also added to the points balance of the customer.
    7. Make a redemption
    Customers can redeem a gift when their points balance is equal to or greater than the
    points value of the gift, and if the gift is available. If redeeming is successful, the points
    value of the gift is subtracted from the points balance of the customer. The total number of
    redemptions made by the customer must also be updated at this time.
    8. Report on which customers are VIP customers
    If a customer has purchased 5 or more items they are considered a VIP customer. A
    method must be provided in the Customer class that determines this.
    NOTE: It is expected that if an error occurs e.g. if a customer does not have enough money to
    purchase an item, then the system will display an appropriate error message. This applies for all
    common errors.
    Program Flow:
    Add a main method to the project (in Customer or another class) so that:
    a) two Customer objects are created
    b) four Item objects are created
    c) two Gift objects are created
    The main method will then be used to simulate the usage of the rewards system. All functionality
    listed above must be demonstrated an example simulation could be:
    - Display the name of each Customer in the system (there are two)
    - Display the name of each Item available for purchase
    - Demonstrate update methods for Customer
    - Demonstrate update methods for Item
    - Demonstrate update methods for Gift
    - Display the price and points value for an item
    - Allow a customer to purchase an item (zero bonus points for the item)
    - Allow a customer to purchase an item (non-zero bonus points for the item)
    - Allow a customer to redeem a gift
    - Display whether the two customers are VIP customers or not


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,384
    My Mood
    Hungover
    Thanks
    144
    Thanked 628 Times in 538 Posts

    Default re: Please friends help me out with this assignment question

    ....what exactly do you need help with?

    I highly suggest you read through the link in my signature on asking smart questions, then post an SSCCE and ask a single, specific, technical question. Otherwise it's going to be pretty hard to help you.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

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

    Default Re: Please friends help me out with this assignment question

    Also please try to use titles describing the problem, not which school you attend. I have shortened the title some, but it will be changed to reflect your question once you decide what it will be.

  4. #4
    Junior Member
    Join Date
    Nov 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Please friends help me out with this assignment question

    It is actually a coding to be done in blue j and above mentioned is the question and class we have to make.

  5. #5
    Junior Member
    Join Date
    Nov 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Please friends help me out with this assignment question

    below am providing just a code example its not exactly what we have to do but just a code example to follow the pattern.Thanks
    class Student
    {
    int ID;
    String name;

    Student()
    {
    }

    void wakeUp()
    {
    System.out.println("I am awake!");
    }








    }




    public class MyStudentProgram
    {
    public static void main(String[] args)
    {
    Student tim = new Student();
    Student bella = new Student();
    tim.wakeUp();
    bella.wakeUp();








    }
    }

  6. #6
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,545
    My Mood
    Grumpy
    Thanks
    0
    Thanked 167 Times in 158 Posts

    Default Re: Please friends help me out with this assignment question

    Quote Originally Posted by yakshu View Post
    It is actually a coding to be done in blue j and above mentioned is the question and class we have to make.
    Totally irrelevant.
    Improving the world one idiot at a time!

  7. #7
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,545
    My Mood
    Grumpy
    Thanks
    0
    Thanked 167 Times in 158 Posts

    Default Re: Please friends help me out with this assignment question

    Quote Originally Posted by yakshu View Post
    below am providing just a code example
    So what is your question? A specific question. "I don't know what to do" is not specific and not a question.
    Improving the world one idiot at a time!

  8. #8
    Junior Member
    Join Date
    Nov 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Please friends help me out with this assignment question

    This is a assignment and i already provided you the question above u have to do the coding in blue j by making the classes and all....i will again give the question below
    Overview:
    BeRewarded is a company that runs a rewards program for their customers. When customers
    purchase items they earn rewards points. Customers can then use these points to redeem gifts.
    BeRewarded are planning to release a new version of software to provide this functionality and
    you have been hired to write it in Java.
    Below are the requirements of the software:
    Getting Started:
    1. Create a new project in BlueJ called Assignment1. All classes for the assignment are to be
    saved in this project.
    2. Create the required classes for the project - there should be at least three (3) classes:
    Customer, Item and Gift. You can have any number of additional classes you think are
    required.
    3. Class basics:
    Customer – a customer has a name and email address. They also have a points balance,
    cash balance and totals for the number of items that have been purchased and redeemed.
    Item – an item is something a customer can purchase. It has a name, description, price and
    availability. It also has an attribute for the number of bonus points a customer can earn (see
    below for more details)
    Gift – a gift is something a customer can redeem. It has a name, description and
    availability. It also has a points value i.e. a customer must have this number of points to be
    able to redeem it (see below)
    4. Constructors: all classes must have at least 1 alternate constructor that accepts input
    parameters used to initialise the class attributes (done in the body of the constructor).
    Functionality:
    The software must provide these functions:
    - Update (change) the price, description, availability and bonus points for an Item
    - Update (change) the description, availability and points for a Gift
    - Update (change) the email address, points balance and cash balance for a Customer
    - Update (change) the total number of items purchased and the total number of
    redemptions for a Customer
    - Calculate the points value for an Item
    - Customers can purchase an Item
    - Customers can redeem gifts
    - Report on which customers are VIP customers
    NOTE: It is expected that if an error occurs e.g. if a customer does not have enough money to
    purchase an item, then the system will display an appropriate error message. This applies for all
    common errors.
    Detailed Functionality:
    1. Update (change) the price, description, availability and bonus points for an Item
    It must be possible to update the price, description, availability and bonus points for an
    Item. This should be done in four separate methods.
    2. Update (change) the description, availability and points for a Gift
    It must be possible to update the description, availability and points for a Gift. This should
    be done in three separate methods.
    3. Update (change) the email address, points balance and cash balance for a Customer
    It must be possible to update the email address, points balance and cash balance for a
    Customer. This should be done in three separate methods.
    4. Update (change) the total number of items purchased and the total number of redemptions
    for a Customer
    It must be possible to update the total number of items purchased, and the total number of
    redemptions. This should be done in two separate methods.
    5. Calculate points value for an Item
    Reward points are allocated to a customer when they purchase an item. The number of
    points depends on the price of the item according to the following rules:
    $0.01 - $9.99 = 1 point
    $10.00 - $19.99 = 3 points
    $20.00 - $49.99 = 6 points
    $50.00 and over = 9 points
    The method to calculate this should be part of the Item class.
    6. Purchase an Item
    Customers can purchase an item if they have enough cash and the item is available. If the
    purchase is successful the points value of the item (this is a calculated value) is added to
    the points balance for the customer. The price of the item must be deducted from the cash
    balance for the customer. The total number of items purchased by the customer must also
    be updated at this time. If the item purchased has a non-zero amount for bonus points,
    these bonus points are also added to the points balance of the customer.
    7. Make a redemption
    Customers can redeem a gift when their points balance is equal to or greater than the
    points value of the gift, and if the gift is available. If redeeming is successful, the points
    value of the gift is subtracted from the points balance of the customer. The total number of
    redemptions made by the customer must also be updated at this time.
    8. Report on which customers are VIP customers
    If a customer has purchased 5 or more items they are considered a VIP customer. A
    method must be provided in the Customer class that determines this.
    NOTE: It is expected that if an error occurs e.g. if a customer does not have enough money to
    purchase an item, then the system will display an appropriate error message. This applies for all
    common errors.
    Program Flow:
    Add a main method to the project (in Customer or another class) so that:
    a) two Customer objects are created
    b) four Item objects are created
    c) two Gift objects are created
    The main method will then be used to simulate the usage of the rewards system. All functionality
    listed above must be demonstrated – an example simulation could be:
    - Display the name of each Customer in the system (there are two)
    - Display the name of each Item available for purchase
    - Demonstrate update methods for Customer
    - Demonstrate update methods for Item
    - Demonstrate update methods for Gift
    - Display the price and points value for an item
    - Allow a customer to purchase an item (zero bonus points for the item)
    - Allow a customer to purchase an item (non-zero bonus points for the item)
    - Allow a customer to redeem a gift
    - Display whether the two customers are VIP customers or not

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

    Default Re: Please friends help me out with this assignment question

    By posting a duplicate copy of your original post, which I might add amounts to no more than a copy paste of your assignment, you have wasted time of everyone who is trying to offer you help. If you have a question ask it. If not please mark the thread as solved. But please do not waste our time.

  10. #10
    Junior Member
    Join Date
    Nov 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Please friends help me out with this assignment question

    Bro..am not wasting time of anyone....I just want help so am asking you its a blue j assignment ihave to do this question in blue j....and I don't know anything where to start from...and I dnt know why u people are asking me question again which I posted 2 times.

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

    Default Re: Please friends help me out with this assignment question

    We are asking you for your question because you have not asked a question. This is not a code writing service or a homework service. This is a do-it-yourself-with-our-hints-when-you-get-stuck place. Ask a question if you have one. Posting your assignment gives us no clue what you are stuck on. If you don't know where to start you can find a working "Hello World! program" from your favorite search engine. If that is the best you can do post that. But try something first.

  12. #12
    Junior Member
    Join Date
    Nov 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Please friends help me out with this assignment question

    I have no idea to start it as I missed the lecture...please people atleast help me a half of it...I know its odd asking to solve whole of it but its really important for me as its gonna be added in my final marks

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

    Default Re: Please friends help me out with this assignment question

    I have no idea to start it as I missed the lecture...please people atleast help me
    I told you where you can start already.

    please people atleast help me a half of it...
    No one is going to write the code for you. (..and if they do it will be deleted..) If you have no intention of writing it yourself, then this forum is not the place for you to waste your time.

    .I know its odd asking to solve whole of it
    No, people ask this more than anything else, and they all get the same answer.

    its really important for me as its gonna be added in my final marks
    ..then there is no time to waste imho. Get started on it.

  14. #14
    Junior Member
    Join Date
    Nov 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Please friends help me out with this assignment question

    Ok..if I get stuck somewhere....and I post the code then can u help? Atleast now don't say no if I try...

  15. #15
    Forum Admin
    Join Date
    Oct 2012
    Posts
    92
    My Mood
    Amused
    Thanks
    9
    Thanked 18 Times in 13 Posts

    Default Re: Please friends help me out with this assignment question

    Quote Originally Posted by yakshu View Post
    Ok..if I get stuck somewhere....and I post the code then can u help? Atleast now don't say no if I try...
    If you do that your chances of getting some help will increase several folds. Start with coding and if you get stuck somewhere post here exactly what you wanted to do and what is happening. Attach the code when you do that.

  16. #16
    Junior Member
    Join Date
    Nov 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Re: Please friends help me out with this assignment question

    okay..friends i read the lecture notes alot..of times and started my assignment and its due tomorrow...and im finally stuck at the starting it self..please help me out:-
    class Customer
    {

    String name;
    String emailId;

    Customer()
    {


    }

    Customer(String newName,String emailId)
    {
    name=newName;

    }
    void display()
    {

    System.out.println("");

    }


    what is to be written in brackets?and the question is already posted many times in my previous post...this code is from the Customer class....Thank you..

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

    Default Re: Please friends help me out with this assignment question

    what is to be written in brackets?
    We do not write code for assignments. We help others who get stuck writing their own code.

    and the question is already posted many times in my previous post...
    Please post your question again. I do not see it.
    As a side note assignment instructions are not a question, that is a description of the problem. The only reply to the instructions would be the code. We don't write code for assignments, so people say nothing to your post. If you want help, ask a question. If you want code, find a code writing service.

    this code is from the Customer class....
    Please see the announcements page for the use of code tags when posting code.

  18. #18
    Junior Member
    Join Date
    Nov 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Please friends help me out with this assignment question

    I am Not asking you to solve my assignment its just am asking you what to do now guys its just am asking for the help to get out of the stucked assignment....and i was told before that if i get stuck i may post my code and ask for help and the question isjust the customer class is to be focused right now as am stuck on it)


    Overview:
    BeRewarded is a company that runs a rewards program for their customers. When customers
    purchase items they earn rewards points. Customers can then use these points to redeem gifts.
    BeRewarded are planning to release a new version of software to provide this functionality and
    you have been hired to write it in Java.
    Below are the requirements of the software:
    Getting Started:
    1. Create a new project in BlueJ called Assignment1. All classes for the assignment are to be
    saved in this project.
    2. Create the required classes for the project - there should be at least three (3) classes:
    Customer, Item and Gift. You can have any number of additional classes you think are
    required.
    3. Class basics:
    Customer – a customer has a name and email address. They also have a points balance,
    cash balance and totals for the number of items that have been purchased and redeemed.
    Item – an item is something a customer can purchase. It has a name, description, price and
    availability. It also has an attribute for the number of bonus points a customer can earn (see
    below for more details)
    Gift – a gift is something a customer can redeem. It has a name, description and
    availability. It also has a points value i.e. a customer must have this number of points to be
    able to redeem it (see below)
    4. Constructors: all classes must have at least 1 alternate constructor that accepts input
    parameters used to initialise the class attributes (done in the body of the constructor).
    Functionality:
    The software must provide these functions:
    - Update (change) the price, description, availability and bonus points for an Item
    - Update (change) the description, availability and points for a Gift
    - Update (change) the email address, points balance and cash balance for a Customer
    - Update (change) the total number of items purchased and the total number of
    redemptions for a Customer
    - Calculate the points value for an Item
    - Customers can purchase an Item
    - Customers can redeem gifts
    - Report on which customers are VIP customers
    NOTE: It is expected that if an error occurs e.g. if a customer does not have enough money to
    purchase an item, then the system will display an appropriate error message. This applies for all
    common errors.
    Detailed Functionality:
    1. Update (change) the price, description, availability and bonus points for an Item
    It must be possible to update the price, description, availability and bonus points for an
    Item. This should be done in four separate methods.
    2. Update (change) the description, availability and points for a Gift
    It must be possible to update the description, availability and points for a Gift. This should
    be done in three separate methods.
    3. Update (change) the email address, points balance and cash balance for a Customer
    It must be possible to update the email address, points balance and cash balance for a
    Customer. This should be done in three separate methods.
    4. Update (change) the total number of items purchased and the total number of redemptions
    for a Customer
    It must be possible to update the total number of items purchased, and the total number of
    redemptions. This should be done in two separate methods.
    5. Calculate points value for an Item
    Reward points are allocated to a customer when they purchase an item. The number of
    points depends on the price of the item according to the following rules:
    $0.01 - $9.99 = 1 point
    $10.00 - $19.99 = 3 points
    $20.00 - $49.99 = 6 points
    $50.00 and over = 9 points
    The method to calculate this should be part of the Item class.
    6. Purchase an Item
    Customers can purchase an item if they have enough cash and the item is available. If the
    purchase is successful the points value of the item (this is a calculated value) is added to
    the points balance for the customer. The price of the item must be deducted from the cash
    balance for the customer. The total number of items purchased by the customer must also
    be updated at this time. If the item purchased has a non-zero amount for bonus points,
    these bonus points are also added to the points balance of the customer.
    7. Make a redemption
    Customers can redeem a gift when their points balance is equal to or greater than the
    points value of the gift, and if the gift is available. If redeeming is successful, the points
    value of the gift is subtracted from the points balance of the customer. The total number of
    redemptions made by the customer must also be updated at this time.
    8. Report on which customers are VIP customers
    If a customer has purchased 5 or more items they are considered a VIP customer. A
    method must be provided in the Customer class that determines this.
    NOTE: It is expected that if an error occurs e.g. if a customer does not have enough money to
    purchase an item, then the system will display an appropriate error message. This applies for all
    common errors.
    Program Flow:
    Add a main method to the project (in Customer or another class) so that:
    a) two Customer objects are created
    b) four Item objects are created
    c) two Gift objects are created
    The main method will then be used to simulate the usage of the rewards system. All functionality
    listed above must be demonstrated – an example simulation could be:
    - Display the name of each Customer in the system (there are two)
    - Display the name of each Item available for purchase
    - Demonstrate update methods for Customer
    - Demonstrate update methods for Item
    - Demonstrate update methods for Gift
    - Display the price and points value for an item
    - Allow a customer to purchase an item (zero bonus points for the item)
    - Allow a customer to purchase an item (non-zero bonus points for the item)
    - Allow a customer to redeem a gift
    - Display whether the two customers are VIP customers or not

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

    Default Re: Please friends help me out with this assignment question

    Saying "I'm stuck" does not explain where you are stuck or even which part of the assignment you are working on.
    You have to ask a question if you want an answer.

    I thought we already discussed you posting the instructions to the assignment repeatedly. We saw them the first and second time. Now the third time. You still have not asked a question.
    Reading "How to ask a question the smart way" may increase your productivity.

  20. #20
    Junior Member
    Join Date
    Nov 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Please friends help me out with this assignment question

    man..i already told u that in blue j i made the class "customer" and described my code done till now i wanted to know how will i describe the email id and name of customer and points as in the question in blue j code?

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

    Default Re: Please friends help me out with this assignment question

    i wanted to know how will i describe the email id and name of customer and points
    My English is not that good but I think adjectives describe nouns. That is not much of a java programming question.

    what is to be written in brackets?
    That may seem like a java programming question. It is a "do my homework for me" question. We do not do that here.
    You read the assignment instructions. You come up with a plan. You come up with a solution. You come up with the code... and if you get stuck along the way, you tell us where you are stuck and what question you have.
    That is 8 yous, 1 we, and 1 us. This system has 80% chance of success if you do your part, but 0% chance if you do not.

Similar Threads

  1. Replies: 4
    Last Post: August 17th, 2012, 10:37 PM
  2. Simple question about a ticketmachine assignment
    By Ypmaha in forum Object Oriented Programming
    Replies: 17
    Last Post: March 30th, 2012, 09:35 AM
  3. Help with assignment about a board game (enum and array question)
    By Kranti1992 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 12th, 2012, 07:47 AM
  4. assignment troubles polymorphism (guide for assignment included)
    By tdawg422 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 8th, 2011, 10:01 AM
  5. hi friends
    By bsrk315 in forum Member Introductions
    Replies: 0
    Last Post: April 20th, 2010, 03:36 PM