Java assignment help
This is creating the service layer and domain layer. Nothing else.
An Overview. Upper right hand of the HomeScreenUI.java there is a Log In button. The person will log in and then have a choice to add / update or delete the items on the menu
Below, is my envision for the MainItems table (not this assignment)
ID, MenuType, MenuName, MenuDescription
1, Appetizer, Ahi Sashimi, Ahi Sashimi
2, Appetizer, Salmon Sashimi, Salmon Sashimi
3, Appetizer, Bay Shrimp Coctail, Bay Shrimp Coctail
4, Appetizer, Medium Shrimp Coctail, Medium Shrimp Coctail
5, MainMenu, Salads, SALADS
Grilled fish served over fresh mixed greens, cucumbers, red onion, carrots, tomatoes and capers. Choose from our homemade dressings bleu cheese, ranch, thousand islands or vinaigrette. Fish is at least a 6-ounce portion
6, MainMenu, Sandwiches, SANDWICHES
Served on a soft bolillo roll with fresh chopped lettuce, red onion, tomatoes and homemade tartar sauce, toasted upon request.
7, MainMenu, Taco, TACO
Served on fresh corn tortillas with cabbage, tomatoes, onions, cheddar cheese, our homemade white sauce and your choice fish, marinated in our spicy chipotle.
8, Beverages, Coke, Non-Alcoholic
9, Beverages, Diet Coke, Non-Alcoholic
10, Beverages, Root Beer, Non-Alcoholic
11, Beverages, Dr. Pepper, Non-Alcoholic
12, Beverages, Sprite, Non-Alcoholic
13, Beverages, Cucumber Martini, Alcoholic
14, Beverages, Pineapple Drop, Alcoholic
15, Beverages, Raspberry Drop, Alcoholic
Here is my envision for the MenuSubItems:
1, Red Snapper Salad, Salads
2, Scallop Salad, Salads
3, Jumbo Shrimp Salad, Salads
4, Mahi Mahi Salad, Salads
5, Red Snapper Sandwiches, Sandwiches
6, Scallop Sandwiches, Sandwiches
7, Jumbo Shrimp Sandwiches, Sandwiches
8, Mahi Mahi Sandwiches, Sandwiches
9, Red Snapper Taco, Taco
10, Scallop Taco, Taco
11, Jumbo Shrimp Taco, Taco
12, Mahi Mahi Taco, Taco
CS444 – Software Engineering
Assignment 3 – The Domain and Service Layers
1 Background
When designing a software system, one of the most significant early products of the analysis and
design workflows is the logical architecture of the system. Logical architecture can take many forms,
including client-server, peer-to-peer, pipe-and-filter, etc. Refer to the book, Software Architecture:
Perspectives on an Emerging Discipline by Shaw and Garlan, for a more comprehensive discussion
on the various software architectural styles. In this assignment, we will use a layered software
architecture. For our purposes, a layer is nothing more than a fairly coarse-grained grouping of
classes, organized into Java packages, with a cohesive set of responsibilities for a major function
in the system. We have already implemented one layer when we constructed the user interface,
i.e., the presentation layer. For this iteration, we will design and build two additional layers of our
application: the domain layer and the service layer. Each of these layers has a distinct responsibility,
and therefore should be organized into separate abstractions.
2 Requirements
Building on the existing project, which by now consists only of a presentation layer, we will add
two additional layers, each implemented as classes contained within a Java package, that represent
the domain layer and the service layer. Each layer is discussed separately.
Domain Layer. The domain layer represents entities of significance in the problem domain. For
example, in a bookstore application we might have entities such as books, customers, accounts, and
so forth. These real-world entities are considered conceptual classes, in that they refer to things
familiar within the problem domain, and arent simply made-up software constructs such as windows
and scrollbars. The domain layer of your application will consist of Java classes that represent these
conceptual classes. Therefore, for a bookstore application there would be a Java class representing a
book, containing fields that appropriately and sufficiently describe attributes of a book as we know
it in the real world. In your list of things application, clearly you will need to develop a class that
represents that thing. Another conceptual class you will need to implement is an Account class,
since the application should support multiple users, each with separate login credentials. Accounts,
although intangible, are real-world entities and therefore should be implemented as classes within
the domain layer.
Identifying these classes and developing a domain model illustrating their attributes and asso-
ciations is the purpose of the Analysis step in software development. Were not going to develop a
domain model in this assignment since the problem domain is sufficiently simple and straightfor-
ward, but you do need to consider any relevant conceptual classes and implement them in Java as
part of the domain layer when you build your project.
1
As you progress from Analysis to Design (the specific delineation between steps is oftentimes
quite blurry), you will transition from discovery of conceptual classes to invention of other (soft-
ware) classes. These additional classes arise once you begin thinking about design and how objects
will actually interact to fulfill their responsibilities. They also arise from another design activity:
application of design patterns. We discuss design patterns later in the term. In essence, during
design you invent classes that are necessary in order to make things work. In this project you will
have at least one additional class: a Login class that will encapsulate an identifier, i.e., a user name,
and a password field.
Use the naming convention CS444
ing the domain layer.
Please keep in mind, there is little to no functionality implemented at the domain layer. The
classes here are those representing data to be persisted in the application. The actual functionality
will be implemented in other layers. Refer to the PowerPoint slides, Developing the Domain
Layer, for instructions on how to build the domain layer for your application.
Service Layer. The service layer is where the application logic will be implemented. As a general
rule, a layer only calls on services implemented in the layer beneath it, i.e., the classes based on
Java Swing in the presentation layer will call on services in the service layer, and the service layer
will access classes in the domain layer to fulfill its responsibilities. A layered architecture structured
in this manner is not the only way to build an application, but it is extremely common.
Use the naming convention CS444
senting the service layer.
In this project, the Account class will be the primary container for domain objects at run time,
and as such is the centerpiece of the service layer. The use of interfaces and classes that imple-
ment them is a common pattern in object-oriented design. We will use an interface for services
on account objects, and implement that interface using a class called AccountSvcImpl. Note that
this class will only provide for operations on Account objects, not the things maintained in the
list. Those are separate use cases that will be implemented in later iterations. Also note that we
are not yet linking the layers, so this iteration will not provide any functionality of interest to the
user, only structure. We will integrate layers and build functionality in the next iteration. Detailed
instructions for building the service layer can be found in the PowerPoint slides, Developing the
Service Layer.
Corrections from Previous Iteration. This project is being designed and implemented itera-
tively. As discussed earlier in class, each iteration provides an opportunity to revise and improve
the code based on test results and stakeholder feedback. With that in mind, any suggested improve-
ments to the presentation layer from the previous iteration should be implemented in this iteration,
even if points were not deducted for them. Refer to the Assignment 3 Rubric for specific details.
Deliverables. Submit your unit-tested and debugged NetBeans project implementing the presen-
tation, service, and domain layers as a zip file to the course dropbox by the posted due date. Please
verify the zip file contains the correct project files and directory structure (and no more) before
submitting.
2 CS444Project/build.xml
Builds, tests, and runs the project CS444Project.
CS444Project/images/fishLogo.png
CS444Project/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
CS444Project/nbproject/build-impl.xml
Must set src.dir
Must set test.src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
Must set build.test.classes.dir
Must set build.test.results.dir
Must set build.classes.excludes
Must set dist.jar
Must set javac.includes
No tests executed.
Must set JVM to use for profiling in profiler.info.jvm
Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
Must select some files in the IDE or set javac.includes
To run this application from the command line without Ant, try:
java -jar “${dist.jar.resolved}”
Must select one file in the IDE or set run.class
Must select one file in the IDE or set run.class
Must select one file in the IDE or set debug.class
Must select one file in the IDE or set debug.class
Must set fix.includes
This target only works when run from inside the NetBeans IDE.
Must select one file in the IDE or set profile.class
This target only works when run from inside the NetBeans IDE.
This target only works when run from inside the NetBeans IDE.
This target only works when run from inside the NetBeans IDE.
Must select one file in the IDE or set run.class
Must select some files in the IDE or set test.includes
Must select one file in the IDE or set run.class
Must select one file in the IDE or set applet.url
Must select some files in the IDE or set javac.includes
Some tests failed; see details above.
Must select some files in the IDE or set test.includes
Some tests failed; see details above.
Must select some files in the IDE or set test.class
Must select some method in the IDE or set test.method
Some tests failed; see details above.
Must select one file in the IDE or set test.class
Must select one file in the IDE or set test.class
Must select some method in the IDE or set test.method
Must select one file in the IDE or set applet.url
Must select one file in the IDE or set applet.url
CS444Project/nbproject/genfiles.properties
build.xml.data.CRC32=90afaf12
build.xml.script.CRC32=527bfd3f
[emailprotected]
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=90afaf12
nbproject/build-impl.xml.script.CRC32=a4f79c25
nbproject/[emailprotected]
CS444Project/nbproject/private/private.properties
compile.on.save=true
user.properties.file=C:\Users\mp802\AppData\Roaming\NetBeans\8.2rc\build.properties
CS444Project/nbproject/private/private.xml
file:/C:/Users/mp802/OneDrive/Documents/NetBeansProjects/CS444Project/src/cs444project/service/Contact.java
file:/C:/Users/mp802/OneDrive/Documents/NetBeansProjects/CS444Project/src/cs444project/presentation/DeleteItemsUI.java
file:/C:/Users/mp802/OneDrive/Documents/NetBeansProjects/CS444Project/src/cs444project/presentation/HomeScreenUI.java
file:/C:/Users/mp802/OneDrive/Documents/NetBeansProjects/CS444Project/src/cs444project/service/Accounts.java
file:/C:/Users/mp802/OneDrive/Documents/NetBeansProjects/CS444Project/src/cs444project/domain/Login.java
file:/C:/Users/mp802/OneDrive/Documents/NetBeansProjects/CS444Project/src/cs444project/presentation/Add_Update_ItemsUI.java
file:/C:/Users/mp802/OneDrive/Documents/NetBeansProjects/CS444Project/src/cs444project/presentation/CreateAccountUI.java
CS444Project/nbproject/project.properties
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processor.options=
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=
${run.classpath}
debug.test.classpath=
${run.test.classpath}
# Files in build.classes.dir which should be excluded from distribution jar
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/CS444Project.jar
dist.javadoc.dir=${dist.dir}/javadoc
excludes=
file.reference.jcalendar-1.4.jar=C:\Users\mp802\OneDrive\Documents\Desktop\jcalendar-1.4\lib\jcalendar-1.4.jar
includes=**
jar.compress=false
javac.classpath=
${file.reference.jcalendar-1.4.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.external.vm=true
javac.processorpath=
${javac.classpath}
javac.source=1.8
javac.target=1.8
javac.test.classpath=
${javac.classpath}:
${build.classes.dir}
javac.test.processorpath=
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=cs444project.CS444Project
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
run.classpath=
${javac.classpath}:
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project.
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
run.jvmargs=
run.test.classpath=
${javac.test.classpath}:
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
CS444Project/nbproject/project.xml
org.netbeans.modules.java.j2seproject
CS444Project
CS444Project/src/cs444project/domain/Accounts.java
CS444Project/src/cs444project/domain/Accounts.java
/*
*Tochangethislicenseheader,chooseLicenseHeadersinProjectProperties.
*Tochangethistemplatefile,chooseTools|Templates
*andopenthetemplateintheeditor.
*/
package
cs444project
.
domain
;
/**
*
*
@author
mp802
*/
public
class
Accounts
{
}
CS444Project/src/cs444project/domain/Contact.java
CS444Project/src/cs444project/domain/Contact.java
/*
*Tochangethislicens