ITEC 8030 Walden University Week 6 Retail Transaction Programming Project The skills you have developed in using tools such as Java, NetBeans, and UML and

ITEC 8030 Walden University Week 6 Retail Transaction Programming Project The skills you have developed in using tools such as Java, NetBeans, and UML and applying Java programming constructs such as selection, looping, classes, objects, and arrays will be crucial in the development of your first programming project.

Programming Project 1 provides you with the opportunity to apply all of the concepts you have covered in the first 5 weeks to create a program that emulates a system for handling purchases and other transactions at a retail store.

Don't use plagiarized sources. Get Your Custom Essay on
ITEC 8030 Walden University Week 6 Retail Transaction Programming Project The skills you have developed in using tools such as Java, NetBeans, and UML and
For $10/Page 0nly
Order Essay

Download the Retail Transaction Programming Project document (located in this week’s Learning Resources) and carefully review the requirements.

You will then create a new project in ApacheNetBeans to implement Programming Project 1

https://netbeans.org/

Submit your completed Programming Project 1 by creating a zip archive of your Programming Project 1 NetBeans project folder and submitting the zip archive.

Please save your Project using the naming convention “WK6Proj+last name+first initial.(extension)” as the name.

Berry+L Retail Transaction Programming Project
Project Requirements:
1. Develop a program to emulate a purchase transaction at a retail store. This
program will have two classes, a LineItem class and a Transaction class. The
LineItem class will represent an individual line item of merchandise that a
customer is purchasing. The Transaction class will combine several LineItem
objects and calculate an overall total price for the line item within the transaction.
There will also be two test classes, one for the LineItem class and one for the
Transaction class.
2. Design and build a LineItem class. This class will have three instance variables.
There will be an itemName variable that will hold the identification of the line item
(such as, “Colgate Toothpaste”); a quantity variable that will hold the quantity of
the item being purchased; and a price variable that will hold the retail price of the
item. The LineItem class should have a constructor, accessors for the instance
variables, a method to compute the total price for the line item, a method to
update the quantity, and a method to convert the state of the object to a string.
Using Unified Modeling Language (UML), the class diagram looks like this:
LineItem
– itemName : String
– quantity : int
– price : double
+
+
+
+
+
+
+
+
LineItem( String, int, double )
getName( ) : String
getQuantity( ) : int
getPrice( ) : double
getTotalPrice( ) : double
setQuantity( int )
setPrice( double )
toString( ) : String
a. The constructor will assign the first parameter to the instance variable
itemName, the second parameter to the instance variable quantity, and
the third parameter to the instance variable price.
b. The class will have three accessor methods—getName( ), getQuantity( ),
and getPrice( )—that will return the value of each respective instance
variable.
© 2014 Laureate Education, Inc.
Page 1 of 4
c. The class will have two mutator methods, setQuantity( int ) and setPrice(
double ), that will update the quantity and price, respectively, of the item
associated with the line of the transaction.
d. The method getTotalPrice( ) handles the conversion of the quantity and
price into a total price for the line item.
e. The method toString( ) allows access to the state of the object in a
printable or readable form. It converts the variables to a single string that
is neatly formatted.
Note: Refer to the textbook for a discussion of escape sequences. These
are characters that can be inserted into strings and, when printed, will
format the display neatly. An escape sequence for the tab character can
be inserted to get a tabular form when printing. This tab character is “t”.
The LineItem class will have a toString( ) method that concatenates
itemName, quantity, price, and total price—separated by tab
characters—and returns this new string. When printing an object, the
toString( ) method will be implicitly called, which in this case, will print a
string that will look something like:
Colgate Toothpaste qty 2 @ $2.99
$5.98
3. Build a Transaction class that will store information about the items being
purchased in a single transaction. It should include a customerID and
customerName. It should also include an ArrayList to hold information about
each item that the customer is purchasing as part of the transaction.
Note: You must use an ArrayList, not an array.
4. Build a TransactionTest class to test the application. The test class should not
require any interaction with the user. It should verify the correct operation of the
constructor and all methods in the Transaction class.
Specific Requirements for the Transaction Class
1. The Transaction class should have a constructor with two parameters. The first
is an integer containing the customer’s ID and the second is a String containing
the customer’s name.
2. There should be a method to allow the addition of a line item to the transcript.
The three parameters for the addLineItem method will be (1) the item name, (2)
the quantity, and (3) the single item price.
3. There should be a method to allow the updating of a line item already in the
transaction. Notice that updating an item means changing the quantity or price
(or both). The parameters for the updateItem method are also (1) the item name,
(2) the quantity, and (3) the single item price. Notice that the updating of a
© 2014 Laureate Education, Inc.
Page 2 of 4
specific line item requires a search through the ArrayList to find the desired
item. Anytime a search is done, the possibility exists that the search will be
unsuccessful. It is often difficult to decide what action should be taken when such
an “exception” occurs. Since exception handling is not covered until later in this
textbook, make some arbitrary decisions for this project. If the item to be updated
is not found, take the simplest action possible and do nothing. Do not print an
error message to the screen. Simply leave the transaction unchanged.
4. The transaction class needs a method called getTotalPrice to return the total
price of the transaction.
5. There should also be a method to return information about a specific line item. It
should return a single String object in the same format described for the
LineItem class:
Colgate Toothpaste qty 2 @ $2.99
$5.98
Again, the possibility exists that the search for a specific line item will fail. In this
instance, you should return a string containing a message similar to this:
Colgate Toothpaste not found.
6. The final method needed is a toString method. It should return the transaction
information in a single String object. It should use the following format:
Customer ID : 12345
Customer Name : John Doe
Colgate Toothpaste
Bounty Paper Towels
Kleenex Tissue
Transaction Total
qty 2 @ $2.99
qty 1 @ $1.49
qty 1 @ $2.49
$5.98
$1.49
$2.49
$9.96
Notice that a newline character “n” can be inserted into the middle of a string.
Ex.
int age = 30;
String temp = “John Doe n is ” + age + “n” + ” years
old”;
The output would be:
John Doe
is 30
years old
© 2014 Laureate Education, Inc.
Page 3 of 4
Notice also that “n” is a single character and could actually go inside single or
double quotes, depending on the circumstances.
Here is a UML diagram for the Transaction class as described above. Notice that
private instance variables and methods may be added, as needed. For all public
methods use exactly the name given below.
Transaction
– lineItems : ArrayList
– customerID : int
– customerName : String
+
+
+
+
+
+
Transaction( int, String )
addLineItem( String, int, double )
updateItem( String, int, double )
getTotalPrice( ) : double
getLineItem( String ) : String
toString( ) : String
© 2014 Laureate Education, Inc.
Page 4 of 4
Rubric Detail
A rubric lists grading criteria that instructors use to evaluate student work. Your instructor linked a rubric to this item and
made it available to you. Select Grid View or List View to change the rubric’s layout.
Content
Name: ITEC_8030_Week6_Discussion_Rubric
Exit
•
•
Grid View
List View
Element
1a: Initial
Post Description
of
Collection
Mastery (100%)
Exceptional
(93%)
Competent (85%)
Developing
(75%)
Deficient (50%)
Unacc
(0%)
Points:
Points:
Points:
Points:
Points:
Points
5 (16.66666%)
4.65 (15.50%)
4.25 (14.16666%)
3.75 (12.50%)
2.5 (8.33333%)
0 (0.
Student provides a
detailed and
thorough
description of
his/her collection
and the elements
that comprise it,
identifying the
characteristic(s)
that differentiate(s)
the elements in the
collection as well
as the method
he/she applies to
Student provides
a detailed and
thorough
description of
his/her collection
and the
elements that
comprise it,
identifying the
characteristic(s)
that
differentiate(s)
the elements in
the collection as
Student provides a
description of his/her
collection and the
elements that
comprise it,
identifying the
characteristic(s) that
differentiate(s) the
elements in the
collection as well as
the method he/she
applies to that
collection. There are
some errors or
Student provides
a cursory or
incomplete
description of
his/her collection
and the
elements that
comprise it,
vaguely
identifying the
characteristic(s)
that
differentiate(s)
the elements in
Student made an
attempt to
address.
Stude
not su
this e
Mastery (100%)
Exceptional
(93%)
Competent (85%)
Developing
(75%)
Deficient (50%)
Unacc
(0%)
that collection.
There are no
errors.
well as the
method he/she
applies to that
collection. There
are one or two
minor errors.
missing details in the
description.
the collection as
well as the
method he/she
applies to that
collection.
Element
1b: Initial
Post Pseudo
Code
Points:
Points:
Points:
Points:
Points:
Points
5 (16.66666%)
4.65 (15.50%)
4.25 (14.16666%)
3.75 (12.50%)
2.5 (8.33333%)
0 (0.
Student defines
the method using
pseudo code that
contains at least
two if methods.
There are no
errors.
Student defines
the method
using pseudo
code that
contains at least
two if methods.
There are one or
two minor errors.
Student defines the
method using pseudo
code that contains at
least two if methods.
There are some
errors and/or some
areas are ambiguous
or unclear.
Student provides
cursory or
incomplete
method using
pseudo code
that contains at
least two if
methods.
Student made an
attempt to
address.
Stude
not su
this e
Element 2:
Insightful
Feedback
Points:
Points:
Points:
Points:
Points:
Points
10 (33.33333%)
9.3 (31.00%)
8.5 (28.33333%)
7.5 (25.00%)
5 (16.66666%)
0 (0.
Responses are
insightful and fully
contribute to the
quality of
interaction by
explaining whether
their pseudo code
methods
appropriately
Responses are
very good and
fully contribute to
the quality of
interaction by
explaining
whether their
pseudo code
methods
Responses are good
and somewhat
contribute to the
quality of interaction
by explaining
whether their pseudo
code methods
appropriately
address all objects
Responses are
weak and do not
fully contribute to
the quality of
interaction by
explaining
whether their
pseudo code
methods
Student made an
attempt to
address.
Stude
not su
this e
Mastery (100%)
Element 3:
Critical
Analysis
Exceptional
(93%)
Competent (85%)
Developing
(75%)
Deficient (50%)
Unacc
(0%)
address all objects
within the
collection and if
not, suggests code
that should be
added or modified
to more than two
peers.
appropriately
address all
objects within
the collection
and if not,
suggests code
that should be
added or
modified to at
least two peers.
within the collection
and if not, suggests
code that should be
added or modified to
at least two peers.
appropriately
address all
objects within
the collection
and if not,
suggests code
that should be
added or
modified to only
one peer.
Points:
Points:
Points:
Points:
Points:
Points
5 (16.66666%)
4.65 (15.50%)
4.25 (14.16666%)
3.75 (12.50%)
2.5 (8.33333%)
0 (0.
Student
demonstrates
exceptional critical
analysis of posted
ideas by asking for
evidence to
support claims,
providing evidence
to support claims,
and revisiting the
Discussion to
respond to other
responses about
the posting.
Student
demonstrates
very good critical
analysis of
posted ideas by
asking for
evidence to
support claims,
providing
evidence to
support claims,
and revisiting the
Discussion to
respond to other
responses about
the posting.
Student
demonstrates good
critical analysis of
posted ideas by
asking for some
examples to support
claims, providing
some examples to
support claims, and
revisits the
Discussion to
respond to other
responses about the
posting.
Student
demonstrates
weak critical
analysis of
posted ideas by
asking vague
questions, not
supporting
claims, and/or
not revisiting the
Discussion at
least once to
respond to other
responses about
the posting.
Student made an
attempt to
address.
Stude
not su
this e
Element 4:
Form and
Style
Mastery (100%)
Exceptional
(93%)
Competent (85%)
Developing
(75%)
Deficient (50%)
Unacc
(0%)
Points:
Points:
Points:
Points:
Points:
Points
5 (16.66666%)
4.65 (15.50%)
4.25 (14.16666%)
3.75 (12.50%)
2.5 (8.33333%)
0 (0.
Student
demonstrates
exceptional
organization and
writing skills by
consistently
applying APA
format and style.
Writing is wellorganized and
grammatically
correct including
complete
sentences that are
free of spelling
errors. The post
provides a correct
reference of
sources by using
page numbers or
URLs.
Student
demonstrates
exceptional
organization and
writing skills by
consistently
applying APA
format and style.
Writing is wellorganized and
grammatically
correct including
complete
sentences that
are free of
spelling errors.
The post
provides a
correct reference
of sources by
using page
numbers or
URLs. There are
one or two minor
errors.
Student
demonstrates good
organization and
writing skills by
mostly applying APA
format and style.
Writing is wellorganized and mostly
grammatically correct
including complete
sentences that are
mostly free of
spelling errors. The
post provides a
correct reference of
sources by using
page numbers or
URLs. There are
some errors.
Student
demonstrates
weak
organization and
writing skills by
inconsistently
applying APA
format and style.
Writing is not
well-organized,
or is not
grammatically
correct, and/or
has many
spelling errors.
The post may
not provide a
correct reference
of sources by
using page
numbers or
URLs. There are
many errors.
Student made an
attempt to
address.
Stude
not su
this e
Name:ITEC_8030_Week6_Discussion_Rubric
Exit

Purchase answer to see full
attachment

admin

Recent Posts

Economic Debate #3- Progressive Income Tax – The Homework Helper

Economic Debate- Progressive Income Tax For this Economic Debate, we are going to discuss the…

2 years ago

MKT 6120 – Marketing Management – Davis Learning Engagement #7

TOPIC: Going Global Discussion Thread 1 (initial post due Wednesday for full credit) Please note:…

4 years ago

jvjvjhvjhvhjvj

Assignment Topic This week will culminate in the creation of a narrated PowerPoint to create…

4 years ago

Students are supposed to select a technological organization of their choice.

The Assignment must be submitted on Blackboard (WORD format only) via allocated folder. Assignments submitted…

4 years ago

Increases the risk of wildfires

you need to post your 2-page information flier to share with your Final Project Group.…

4 years ago

Statistics for Technology management

discussion: Discuss the methods used at your company to measure and ensure quality products and…

4 years ago