Broncos/build.xml
Builds, tests, and runs the project Broncos.
Broncos/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
Broncos/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
...
Broncosbuild.xmlBuilds, tests, and runs the project Broncos..docx
1. Broncos/build.xml
Builds, tests, and runs the project Broncos.
Broncos/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
Broncos/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
16. Must set JVM to use for profiling in profiler.info.jvm
Must set profiler agent JVM arguments in
profiler.info.jvmargs.agent
17.
18.
19.
20.
21. Broncos/nbproject/genfiles.properties
build.xml.data.CRC32=dd03dd72
build.xml.script.CRC32=ab548cbe
[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/build-impl.xml.data.CRC32=dd03dd72
nbproject/build-impl.xml.script.CRC32=24a063c6
nbproject/[email protected]
Broncos/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:
22. #debug.transport=dt_socket
debug.classpath=
${run.classpath}
debug.modulepath=
${run.modulepath}
debug.test.classpath=
${run.test.classpath}
debug.test.modulepath=
${run.test.modulepath}
# 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}/Broncos.jar
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.external.vm=true
javac.modulepath=
javac.processormodulepath=
javac.processorpath=
${javac.classpath}
javac.source=1.8
javac.target=1.8
javac.test.classpath=
${javac.classpath}:
${build.classes.dir}:
${libs.junit_4.classpath}:
${libs.hamcrest.classpath}
javac.test.modulepath=
25. Broncos/src/broncos/MonthCollection.javaBroncos/src/broncos/
MonthCollection.javapackage broncos;
import java.util.ArrayList;
publicclassMonthCollection{
publicstaticvoid main(String[] args){
// add 12 months in integer format and 12 months in string form
at
ArrayList<Month> intMonths =newArrayList<>();
ArrayList<Month> stringMonths =newArrayList<>();
String[] calendarMonths =newString[]{"January","February","M
arch",
"April","May","June","July","August","September","October",
"November","December"};
Month intMonth, stringMonth;
for(int i =1; i <=12; i++){
//add integer months to collection
intMonth =newMonth();
intMonth.add(i);
intMonths.add(intMonth);
//add string months to collection
stringMonth =newMonth();
stringMonth.add(calendarMonths[i -1]);
stringMonths.add(stringMonth);
}
//print out string months
printMonths(stringMonths);
//print our all integer months
printMonths(intMonths);
26. }
privatestaticvoid printMonths(ArrayList<Month> months){
for(Month month: months){
System.out.println("Month = "+ month.get()
+" type= "+ month.get().getClass());
}
System.out.println();
}
}
Broncos/test/broncos/MonthTest.javaBroncos/test/broncos/Mont
hTest.java/*
* To change this license header, choose License Headers in Pro
ject Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package broncos;
import org.junit.Test;
importstatic org.junit.Assert.*;
/**
*
* @author fumba
*/
publicclassMonthTest{
/**
* Test of add method, make sure that Integer months are sav
ed as Integers
*/
@Test
27. publicvoid testAddInteger(){
Month instance =newMonth();
instance.add(1);
assertEquals(Integer.class, instance.get().getClass());
}
/**
* Test of add method, make sure that String months are save
d as Strings
*/
@Test
publicvoid testAddString(){
Month instance =newMonth();
instance.add("January");
assertEquals(String.class, instance.get().getClass());
}
/**
* Test of get method, of class Month.
*/
@Test
publicvoid testGetString(){
Month instance =newMonth();
instance.add("january");
assertEquals(instance.get(),"january");
}
/**
* Test of get method, of class Month.
*/
@Test
publicvoid testGetInteger(){
Month instance =newMonth();
instance.add(1);
assertEquals(instance.get(),1);
28. }
}
PURPOSE OF ASSIGNMENT
The University has a need to develop an Object-Oriented
Parking System. Each assignment will build towards creating
the parking system.
1. The University has several parking lots and the parking fees
are different for each parking lot.
1. Customers must have registered with the University parking
office in order to use any parking lot. Customers can use any
parking lot. Each parking transaction will incur a charge to their
account.
1. Customers can have more than one car, and so they may
request more than one parking permit for each car.
1. The University provides a 20% discount to compact cars
compare to SUV cars.
1. For simplicity, assume that the Parking Office sends a
monthly bill to customer and customer pays it outside of the
parking system.
1. Each week you will need to submit an updated Class Diagram
along with the other deliverables for the assignment.
The goal of this assignment is to create ParkingOffice and
ParkingLot classes that demonstrate the use of Java Generics
and Collections. You will also need to lookup the Java Enum
type and use it to describe the type of the car.
ASSIGNMENT INSTRUCTIONS
Develop Java code for the ParkingOffice, ParkingLot and
Money classes, and the CarType enum, shown in the diagram
below. The data attributes and methods are provided as a guide,
please feel free to add more as you feel necessary. Explain your
choices in the write-up. Note that the ParkingLot and Money
29. classes should be immutable; once created with values they
cannot be modified.
Class: Money
1. Data Attributes
0. amount : long
0. currency : String
Enum: CarType
1. Values
0. COMPACT
0. SUV
Class: ParkingLot
1. Data Attributes
0. id : String
0. name : String
0. address : Address
1. Behaviors
1. getDailyRate(CarType) : Money
Class: ParkingOffice
1. Data Attributes
0. parkingOfficeName : String
0. listOfCustomers : List<Customer>
0. listOfParkingLots : List<ParkingLot>
0. parkingOfficeAddress : Address
1. Behaviors
1. getParkingOfficeName() : String
1. register(Customer) : void
Create a 500-word write-up that explains your assignment. You
may address some of the below questions.
1. What did you find difficult or easy?
1. What helped you?
1. What you wish you knew before?
1. Outline any implementation decisions and the reasoning
behind those.
1. Include screenshots of the successful code compilation and
test execution.
Submit a zip file that includes Class diagrams, write-up, Source
30. java files, and Unit Test java files. In your write-up include
screen shots of successful unit tests.
FORMATTING AND STYLE REQUIREMENTS
1. Write-ups should be between 400 and 500 words.
1. Where applicable, refer to the UCOL Format and Style
Requirements (Links to an external site.) on the Course
Homepage, and be sure to properly cite your sources
using Turabian Author-Date style citations (Links to an external
site.).
1.
1.
1.
1.
1.
1. Rubric
Programming Rubric
Programming Rubric
Criteria
Ratings
Pts
This criterion is linked to a Learning OutcomeCode
Functionality and Efficiency
The class(es) created meet the design specification and
therefore accomplishes the task at hand. It/they are written with
proper OOP techniques applied. The class(es) are set up with
proper interfaces so they can collaborate with other classes and
execute the necessary tasks. The code compiles without errors.
60.0 pts
This criterion is linked to a Learning OutcomeCode Testing
The test code is written to test the class(es) and is designed and
implemented properly.
20.0 pts
This criterion is linked to a Learning OutcomeCode Quality
31. The code contains only the necessary variables. Variable names
are meaningful. The code is well-formatted, easy to read and
appropriately commented. The code includes proper error and
exception handling.
10.0 pts
This criterion is linked to a Learning OutcomeWrite-Up
The write-up summarizes lessons learned and any difficulty the
student may have encountered. It also outlines any
implementation decision and reasoning behind those.
Screenshots of the successful code compilation and test
execution are included.
10.0 pts
Total Points: 100.0