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.

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

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.

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

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.

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.

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.

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

Re: Please friends help me out with this assignment question

Originally Posted by yakshu

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.

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.

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

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.

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?

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.