Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

DPIT121 – Assignment I Due: Week 4 and 5 lab In Assignment I, you will continue on another iteration for the same scenario from lab 1, 2, and 3. If you have not finished those labs, you have time to...

1 answer below »
DPIT121 – Assignment I
Due: Week 4 and 5 lab
In Assignment I, you will continue on another iteration for the same scenario from lab 1, 2,
and 3. If you have not finished those labs, you have time to work on them and finalize your
assignment I. We can consider lab 1 to 3 as internal iterations or Scrum Sprints inside the
company and Assignment I as a phase of project delivery to the customer.
Assignment I has three levels of completion: Core, Standard, and Advanced. You should
completely finish a level before attempting the following level.
Core Level: 6 marks to be marked in Week 4 or Week 5
Standard Level: 9 marks to be marked in Week 4 or Week 5
Advanced Level: 12 marks to be marked in Week 4 or Week 5
Core Level:
You need to finish all the requirements of lab 1 to 3 including all the classes, methods and the
test code. In addition, you need to do the following tasks:
1) Comment out the scanner and user input from your test code that was required in lab 2 and
3. You need to write a proper Test Case (refer to Lectures) and modify your test code to
implement the test case. Test code should call all the methods across all classes. To validate
your program, write your output expectations in the test case (You may use excel) and compare
the output of the test code with your expectation. Include the test case in your submission. You
need to justify and convince me as your customer that the output is co
ect based on your test
case and expectations. Note that the test case should not include any user interaction (Scanner)
and has to follow a proper story. 1 mark
2) Draw a UML class diagram for your program by using UMLet or any other tools. 1 mark
3) Draw a UML Sequence Diagram for A
ayList filterByExpiryDate (int
userID, MyDate date) in MobileCompany class. 1 mark
4) Design and implement a basic command based console User Interface. (See the sample code
in week 3). The program asks company admin to enter the username and password to log in to
the system. After successful log in the program shows 9 options: 3 marks
Option 1: Test code: To run the test code based on your test case
Option 2: Create User: To get the information from admin and creates a user
Option 3: Create Personal Plan: To get the information of a plan and a user id from admin and
creates a PersonalPlan for the given user. Prints an e
or message if not successful.
Option 4: Create Business Plan: To get the information of a plan and a user id from admin and
creates a BusinessPlan for the given user. Prints an e
or message if not successful.
Option 5: Print User Information: To get a user ID from user and prints the user information
(including all user plans). Prints an e
or message if user ID is not found.
Option 6: Filter by Mobile Model: To get a mobile model from admin and filters and prints all
the plans in the system with that mobile model as well as the total monthly payments for the
filtered plans.
Option 7: Filter by Expiry Date: To get a date and a user id from admin and filters and prints
all the plans belong to that user and expiring by the given date.
Option 8: Update Address: To get a user id and address information and updates the address
of the given suer
Option 9: Log Out
Play with your UI to be sure that all options are working properly. Remember that you already
created few users and plans in your test code.
Standard Level:
1- You need to add new methods to your class MobileCompany for a data aggregation report.
The report is the total monthly payments of all users per city (from User.address).
- A
ayList populateDistinctCityNames()
goes through all the users and
populate a list of distinct city names for all users and returns it as a list.
- double getTotalPaymentForCity(String city)
returns the total monthly payments for
the given city across all users.
- A
ayList getTotalPaymentPerCity(A
ayList cities)
aggregates
the total payments for each city in the list and returns it as a double list with the same order as
city names. This method calls getTotalPaymentForCity (String city)
- reportPaymentPerCity( A
ayList cities, A
ayList payments,

generates the report as follow:
City Name Total Monthly Payment
Wollongong $10,500.00
Sydney $45,980.00

Assuming that there are 110 users with the city=”Wollongong” and the total of monthly
payments for all of their plans is $10,500
* Update your test code to test these extra methods.
2- Update the text based menu as below:
The Main Menu has 3 options:
Option 1: Admin Login. Then it prompts to get admin username and password and if login is
successful it shows the Admin Menu if not it shows an e
or message and shows the main
menu again.
Option 2: User Login. It shows the User Menu
Option 3: exit the program
Admin Menu has all 9 options the same as core. Add options to do the data aggregation
eports.
User Menu has options for the methods inside User class such as Add a Plan, print a Plan,
change the address, etc
Note: Each menu is displayed again after each report/task till user enters the option to log out
and returns to the main menu. After each task a message “please press any key to continue”
will be displayed and after the user presses a key the menu will be displayed again.
Advanced Level:
Add these functionalities to your code as well as UI:
1- User and admin to be able to remove a plan from a user
2- User ID to be automatically generated (incrementally). Hint: have a static int count in the
class and increment it
3- Admin to be able to remove a user by providing the user ID.
4- Admin to be able to change the admin password
5- You need to add new methods to your class User and MobileCompany for another data
aggregation report. The report is the count, total and average of monthly payments per
MobileModel across all the plans a user holds and across all the users in the company
Add these methods to User:
- A
ayList populateDistinctMobileModels()
goes through all the plans for a
user and populates a list of distinct mobile model names
- double getTotalCountForMobileModel(String mobileModel)
returns the number of
plans this user owns for the given mobileModel
- double getTotalPaymentForMobileModel(String mobileModel)
returns the total
monthly payments for the given mobileModel across all the plans this user owns
- A
ayList getTotalCountPerMobileModel (A
ayList
mobileModels)
returns the count for each model in the mobileModels as a list of integers.
Call getTotalCountForMobileModel(String mobileModel) in a loop for each mobileModel in
the list
- A
ayList getTotalPaymentPerMobileModel (A
ayList
mobileModels)
returns the Total Payment for each model in the mobileModels as a list of
doubles. Call getTotalPaymentForMobileModel(String mobileModel) in a loop for each
mobileModel in the list
- reportPaymentsPerMobileModel (A
ayList mobileModels,
A
ayListcounts, A
ayList monthlyPayments)
generates the report
such as below:
Mobile Model Total Monthly Payment Average Monthly Payment
Iphone X $1,050.00 $105.00
Samsung Galaxy 10 $425.00 $85.00
(Assume this user has ten plans with the Mobile Model of “Iphone X” and five with Samsung
Galaxy 10)
Add these methods to MobileCompany:
- A
ayList populateDistinctMobileModels()
goes through all the users
within the MobileCompany and populates a list of distinct mobile models. You need to call
the co
esponding method inside the User and aggregate them for all the users
- A
ayList getTotalCountPerMobileModel (A
ayList
mobileModels)
returns the count for each model across all the users. You need to call the
co
esponding method inside the User and aggregate them for all the users
- A
ayList getTotalPaymentPerMobileModel (A
ayList
mobileModels)
the same as the previous one but across all users in the company
- reportPaymentsPerMobileModel (A
ayList mobileModels,
A
ayListcounts, A
ayList monthlyPayments)
to generate the same
eport as before but across all users in the system
6- Modify your test code to test all of these methods for User and MobileCompany.
7- Update your UI to include all of these changes for User and MobileCompany.
    Core Level: 6 marks to be marked in Week 4 or Week 5
    Standard Level: 9 marks to be marked in Week 4 or Week 5
    Advanced Level: 12 marks to be marked in Week 4 or Week 5
Answered Same Day Aug 05, 2021

Solution

Aditya answered on Aug 07 2021
150 Votes
DPIT121Assignment I
uild.xml

Builds, tests, and runs the project DPIT121–Assignment I.


DPIT121Assignment I/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
DPIT121Assignment I/nbproject
uild-impl.xml








































































































































































































Must set src.di
Must set test.src.di
Must set build.di
Must set dist.di
Must set build.classes.di
Must set dist.javadoc.di
Must set build.test.classes.di
Must set build.test.results.di
Must set build.classes.excludes
Must set dist.ja




































































































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




















































DPIT121Assignment I/nbproject/genfiles.properties
uild.xml.data.CRC32=5805c313
uild.xml.script.CRC32=ab9eedba
[email protected]
# 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
uild-impl.xml.data.CRC32=5805c313
nbproject
uild-impl.xml.script.CRC32=e0
d127
nbproject
[email protected]
DPIT121Assignment I/nbproject/private/private.properties
compile.on.save=true
user.properties.file=C:\\Users\\Aditya_Lakhera\\AppData\\Roaming\\NetBeans\\8.0.1\\build.properties
DPIT121Assignment I/nbproject/private/private.xml




file:/F:/eclips
enze4julyeprgram/DPIT121–Assignment%20I/src/MobileCompany.java
file:/F:/eclips
enze4julyeprgram/DPIT121–Assignment%20I/src/LoginManager.java
file:/F:/eclips
enze4julyeprgram/DPIT121–Assignment%20I/src/MobilePlan.java
file:/F:/eclips
enze4julyeprgram/DPIT121–Assignment%20I/src/MobilePhone.java
file:/F:/eclips
enze4julyeprgram/DPIT121–Assignment%20I/src/User.java
file:/F:/eclips
enze4julyeprgram/DPIT121–Assignment%20I/src/Main.java


DPIT121Assignment I/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
uild.classes.dir=${build.dir}/classes
uild.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
uild.dir=build
uild.generated.dir=${build.dir}/generated
uild.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
uild.sysclasspath=ignore
uild.test.classes.dir=${build.dir}/test/classes
uild.test.results.dir=${build.dir}/test
esults
# Uncomment to specify the prefe
ed 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 ja
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/DPIT121_Assignment_I.ja
dist.javadoc.dir=${dist.dir}/javadoc
excludes=
includes=**
jar.compress=false
javac.classpath=
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.8
javac.target=1.8
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=\
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here