SlideShare a Scribd company logo
1 of 20
EFE Matrix
External Strategic Factors
Weight
(0.0–1.0; 0=not important, 0.5=somewhat important, and
1.0=important)
Rating
(1–4; 1=poor and 4=good)
Weighted Score
(multiply weight by rating)
Comments
(additional observations)
Opportunities:
Threats:
1
META-INF/MANIFEST.MF
Manifest-Version: 1.0
Created-By: 11.0.1 (Oracle Corporation)
Main-Class: hw2.SpecChecker
.DS_Store
hw2/Generate.classpackage hw2;
publicsynchronizedclass Generate {
public void Generate();
publicstatic void main(String[]) throws
ClassNotFoundException;
}
hw2/SpecChecker$1.classpackage hw2;
synchronizedclass SpecChecker$1 implements Runnable {
void SpecChecker$1();
public void run();
}
hw2/SpecChecker.classpackage hw2;
publicsynchronizedclass SpecChecker {
private TennisMatch tm;
public void SpecChecker();
publicstatic void main(String[]);
public void initializationError();
public void setup();
public void testInitial1();
public void testInitial3();
public void testInitial4();
public void testInitial7();
public void testInitial8();
public void testInitial9();
public void testInitial10();
public void testGame1a();
public void testGame1b();
public void testGame1c();
public void testGame1d();
public void testGame1e();
public void testGame2a();
public void testGame2b();
public void testGame2c();
public void testGame2d();
public void testGame2e();
public void testGame3a();
public void testGame3b();
public void testGame3c();
public void testGame3d();
public void testGame3e();
public void testGame4a();
public void testGame4b();
public void testGame4c();
public void testGame4d();
public void testGame4e();
public void testGame5a();
public void testGame5b();
public void testGame5c();
public void testGame5d();
public void testGame5e();
publicstatic String getModifierDiff(int, int);
privatestatic String getTypesList(Class[]);
public void testForClasses() throws Exception;
public void testHw2TennisMatch() throws Exception;
}
speccheck/desktop.ini
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:Program FilesGoogleDrivegoogledrivesync.exe
IconIndex=16
speccheck/LatestSpecCheckClassLoader.classpackage
speccheck;
publicsynchronizedclass LatestSpecCheckClassLoader extends
java.net.URLClassLoader {
public void LatestSpecCheckClassLoader(String) throws
java.net.MalformedURLException;
public Class loadClass(String) throws
ClassNotFoundException;
}
speccheck/SpecCheck$1.classpackage speccheck;
synchronizedclass SpecCheck$1 extends SecurityManager {
void SpecCheck$1();
public void checkPermission(java.security.Permission);
}
speccheck/SpecCheck$2.classpackage speccheck;
synchronizedclass SpecCheck$2 implements Runnable {
void SpecCheck$2(Class, String, String, String[]);
public void run();
}
speccheck/SpecCheck.classpackage speccheck;
publicsynchronizedclass SpecCheck {
publicstaticfinal SecurityManager noExit;
static void <clinit>();
private void SpecCheck();
publicstatic String grade(Class);
publicstatic String test(Class);
publicstatic String test(Class, String, int);
publicstatictransient void testAndZip(Class, String, String,
String[]);
privatestatictransient void testAndZipHelper(Class, String,
String, String[]);
publicstatictransient void run(Class, String, String,
java.io.File, String[]);
privatestatic boolean zip(String, String[], String) throws
java.io.IOException;
privatestatic boolean addSourceFile(String, String,
java.util.zip.ZipOutputStream, byte[]) throws
java.io.IOException;
publicstatic boolean hasOccludingSpecCheckers(String);
}
speccheck/SpecCheckEvaluator$1.classpackage speccheck;
synchronizedclass SpecCheckEvaluator$1 extends
java.io.OutputStream {
void SpecCheckEvaluator$1();
public void write(int);
}
speccheck/SpecCheckEvaluator.classpackage speccheck;
publicsynchronizedclass SpecCheckEvaluator {
public void SpecCheckEvaluator();
publicstatic String evaluateTests(Class, String, int);
}
speccheck/SpecCheckGenerator$ModifierName.classpackage
speccheck;
finalsynchronizedenum SpecCheckGenerator$ModifierName {
publicstaticfinal SpecCheckGenerator$ModifierName Public;
publicstaticfinal SpecCheckGenerator$ModifierName
Private;
publicstaticfinal SpecCheckGenerator$ModifierName
Protected;
publicstaticfinal SpecCheckGenerator$ModifierName Final;
publicstaticfinal SpecCheckGenerator$ModifierName
Interface;
publicstaticfinal SpecCheckGenerator$ModifierName
Abstract;
publicstaticfinal SpecCheckGenerator$ModifierName Static;
static void <clinit>();
private void SpecCheckGenerator$ModifierName(String, int);
publicstatic SpecCheckGenerator$ModifierName[] values();
publicstatic SpecCheckGenerator$ModifierName
valueOf(String);
}
speccheck/SpecCheckGenerator.classpackage speccheck;
publicsynchronizedclass SpecCheckGenerator {
public void SpecCheckGenerator();
publictransient void testClasses(String[]) throws
ClassNotFoundException;
publictransient void genClassExistenceTest(String[]);
private void genClassTest(String) throws
ClassNotFoundException;
private void genFieldCountTest(String) throws
ClassNotFoundException;
private void genClassModifiersTest(String) throws
ClassNotFoundException;
private void genClassSuperTest(String) throws
ClassNotFoundException;
private void genClassInterfacesTest(String) throws
ClassNotFoundException;
private void genUnspecifiedMethodsTests(String,
reflect.Method[]);
private void genUnspecifiedConstructorsTests(String,
reflect.Constructor[]) throws ClassNotFoundException;
private void genUnspecifiedFieldsTests(String,
reflect.Field[]) throws ClassNotFoundException;
private void genSpecifiedMethodsTests(String,
reflect.Method[]);
private void genSpecifiedConstructorsTests(String,
reflect.Constructor[]);
private void genSpecifiedFieldsTests(String, reflect.Field[]);
privatestatic void
checkModifier(SpecCheckGenerator$ModifierName);
privatestatic void genModifierCompare();
privatestatic String getReadableClassName(String);
privatestatic String getTypesList(Class[]);
privatestatic void genGetTypesList();
}
speccheck/SpecCheckRunListener.classpackage speccheck;
publicsynchronizedclass SpecCheckRunListener extends
org.junit.runner.notification.RunListener {
private java.util.HashMap testToResults;
private java.util.HashMap testToMsg;
private int nPointsPossible;
public void SpecCheckRunListener();
public void testStarted(org.junit.runner.Description);
public void testFailure(org.junit.runner.notification.Failure);
public String getMsg(org.junit.runner.notification.Failure);
public int getScore();
public int getScorePossible();
}
speccheck/SpecCheckTest.classpackage speccheck;
publicabstractinterface SpecCheckTest extends
annotation.Annotation {
publicabstract int nPoints();
publicabstract int order();
publicabstract String msg();
}
speccheck/SpecCheckTestComparator.classpackage speccheck;
synchronizedclass SpecCheckTestComparator implements
java.util.Comparator {
void SpecCheckTestComparator();
public int compare(org.junit.runner.Description,
org.junit.runner.Description);
}
speccheck/SpecCheckUtilities.classpackage speccheck;
publicsynchronizedclass SpecCheckUtilities {
publicstaticfinal boolean PRINT_STACK_TRACES = 1;
public void SpecCheckUtilities();
publicstatic reflect.Method
getMethod(org.junit.runner.Description) throws
SecurityException, NoSuchMethodException,
ClassNotFoundException;
publicstatic String
getClassName(org.junit.runner.Description);
publicstatic String
getMethodName(org.junit.runner.Description);
publicstatic java.util.regex.Matcher
methodStringMatcher(org.junit.runner.Description);
publicstatic void printPartialStackTrace(Throwable, String,
java.io.PrintStream);
}
speccheck/Specified.classpackage speccheck;
publicabstractinterface Specified extends annotation.Annotation
{
publicabstract boolean checkSuper();
publicabstract boolean allowUnspecifiedPublicDefaultCtor();
publicabstract boolean allowUnspecifiedPublicConstants();
publicabstract boolean allowUnspecifiedPublicStuff();
publicabstract int maxVariableCount();
publicabstract Class[] mustThrow();
publicabstract Class[] mustNotThrow();
publicabstract Class[] mustImplement();
}
COM S 227
Fall 2019
Homework 2: Anyone for Tennis?
200 points
Due Date: Saturday, October 12, 11:59 pm (midnight)
5% bonus for submitting 1 day early (by 11:59 pm October 11)
10% penalty for submitting 1 day late (by 11:59 pm October 13)
No submissions accepted after October 13, 11:59 pm
General Information
This assignment is to be done on your own. See the Academic
Dishonesty policy in the syllabus,
http://www.cs.iastate.edu/ cs227/syllabus.html#ad , for details.
You will not be able to submit your work unless you have
completed the Academic Dishonesty policy
acknowledgement on the Homework page on Canvas. Please do
this right away.
If you need help, see your instructor or one of the TAs. Lots of
help is also available through the Piazza
discussions.
Please start the assignment as soon as possible and get your
questions answered right away. It is physi-
cally impossible for the staff to provide individual help to
everyone the night that the assignment is due!
This is a “regular” assignment so we are going to read your
code. Your score will be based partly (about
a third) on the specchecker’s functional tests and partly on the
grader’s assessment of the quality of your
code. See the “More about grading” section.
Tips from the experts: How to waste a lot of time on this
assignment
• Start the assignment the day it’s due. That way, if you have
questions, the TAs will be too busy to help
you and you can blame the staff when you get a bad grade.
• Don’t bother reading the rest of this document, or even the
specification, especially the “Getting
started” section. Documentation is for chumps.
• Don’t test your code. It’s such fun to remain in suspense until
you get your score!
• The main guiding principle is: Try to write all the code before
you figure out what it’s supposed to do.
Overview
The goals of this assignment are to give you more experience
writing classes from specifications and to
provide you with practive working with conditionals.
For this assignment you will implement one class, called
TennisMatch, that models the serving, end-
changing, and scoring of a best-of-three or best-of-five,
advantage sets tennis match. Your class will keep
track of scores, server, ends, and faults, games, sets, and match.
Additionally, provided for you is a TennisPlayer class. Using it
reduces some of the complexity of
TennisMatch. You should use—but should not modify—
TennisPlayer.
Specification
The specification for this assignment includes this pdf, the
TennisMatch javadocs, the official rules of Tennis
(the 2019 Friend of the Court, linked on Piazza) along with any
“official” clarifications posted on Piazza.
http://www.cs.iastate.edu/~cs227/syllabus.html#ad
Where’s the main() method??
There isn’t one! Like most Java classes, this isn’t a complete
program and you can’t “run” it by itself. It’s
just a single class, that is, the definition for a type of object that
might be part of a larger system. To try
out your class, you can write a test class with a main method
such the example provided (on Piazza) in
TestTennisMatch.java.
There will also be a SpecChecker (not ready yet) that will
perform a lot of functional tests, but when
you are developing and debugging your code at first you’ll
always want to have some simple test cases of
your own as in the main method above.
Note that neither the SpecChecker nor the provided test program
nor the combination of the pair provide
complete, comprehensive test coverage of your TennisMatch
implementation. You will have to write your
own tests.
Sample usage
A good way to think about the specification is to try to write
some simple test cases and think about what
behavior you expect to see. The included TestTennisMatch class
implements a main method which tests
much—but not all—of the functionality. It plays a complete
first set, then modifies the score to “jump” to
the last set and finish the match.
There is also a SpecChecker (see below) that will perform a lot
of functional tests, but when you are
developing and debugging your code at first you’ll always want
to have some simple test cases of your own
as in the main method in TestTennisMatch.java.
Suggestions for getting started
Smart developers don’t try to write all the code and then try to
find dozens of errors all at once; they work
incrementally and test every new feature as it’s written. Here is
a rough guide for how an experienced coder
might go about creating a class such as this one:
• Create a new, empty project and add a package called hw2.
• Create the TennisMatch class in the hw2 package and put in
stubs for all the required methods and
constructors. For methods that are required to return a value,
just put in a “dummy” return statement
that returns zero or false.
• Download the specchecker, import it into your project as you
did in labs 1 and 2, and run it. There will
be lots of error messages appearing in the console output, since
you haven’t actually implemented the
methods yet. Always start reading from the top. All you really
want to check at this point is whether
you have a missing or extra public method, if the method
declarations are incorrect, or if something
is really wrong like the class having the incorrect name or
package. Any such errors will appear first
in the output and will usually say “Class does not conform to
specification.”
• Look at each method. Mentally classify it as either an accessor
(returns some information without
modifying the object) or a mutator (modifies the object, usually
returning void). The accessors will
give you a lot of hints about what instance variables you need.
• Before you write code for a method, always write a simple
usage example or test case, similar to the
main method in the provided test code. This will make sure you
understand what the code is really
supposed to do, and it will give later you a way to check
whether you did it correctly. Of course, if
you are really not sure what a method is supposed to do, bring
up your question for discussion on
Piazza!
• It would probably be best to start with the accessors, as they’ll
help you ascertain what instances
variables to expect. The mutators should also be fairly
straightforward and provide insights into the
necessary instance variables.
• The bulk of the work occurs in increment*Points, where * is
one of Game, Set, and Match. These
must not only increment the particular point, but also control
other aspects of game start, like switch-
ing server, switching ends, and ending the game. Furthermore,
incrementGamePoints must call
incrementSetPoints under certain conditions, and that in turn
calls incrementMatchPoints under
other conditions.
Friend of the Court
The rules of tennis that we will be implementing in this
simulation are restricted to only a few sections of
the Friend of the Court. These sections should be considered
part of the specification of this assignment:
• Section 5a for scoring of games
• Section 6a for scoring of sets
• Section 7 for scoring of matches
• Section 10 for changing of ends
• Section 14 for order of service
• Section 23 for description of the let
Additionally, it may be benefitial to read other sections of the
Friend of the Court for context and termi-
nology; however, we will not be implementing rules described
outside of the above sections. For instance,
we will not be implementing tie-break sets, described in Section
6b and elsewhere.
Additional notes
• No loops are needed—nor likely helpful—for this assignment.
You will, however, need many condi-
tional expressions.
• Do not add any additional public methods; you may add your
own methods if you feel compelled to
do so, but they must be declared private. Do not create any
additional Java classes.
The SpecChecker
You can find the SpecChecker online; see the Piazza Homework
post for the link. Import and run the
SpecChecker just as you practiced in Labs 1 and 2. It will run a
number of functional tests and then bring
up a dialog offering to create a zip file to submit. Remember
that error messages will appear in the console
output. There are many test cases so there may be an
overwhelming number of error messages. Always start
reading the errors at the top and make incremental corrections
in the code to fix them. When you are happy
with your results, click “Yes” at the dialog to create the zip file.
See the document “SpecChecker HOWTO”,
which can be found in the Piazza pinned messages
More about grading
This is a “regular” assignment so we are going to read your
code. Your score will be based partly (about
a third) on the specchecker’s functional tests and partly on the
grader’s assessment of the quality of your
code. This means you can get partial credit even if you have
errors, and it also means that even if you pass
all the specchecker tests you can still lose points. Are you doing
things in a simple and direct way that
makes sense? Are you defining redundant instance variables?
Some specific criteria that are important for
this assignment are:
• Use instance variables only for the “permanent” state of the
object, use local variables for temporary
calculations within methods.
– You will lose points for having lots of unnecessary instance
variables
– All instance variables should be private.
• Accessor methods should not modify instance variables.
See the “Style and documentation” section below for additional
guidelines.
Style and documentation
Roughly 15% of the points will be for documentation and code
style. Here are some general requirements
and guidelines:
• Each class, method, constructor and instance variable, whether
public or private, must have a mean-
ingful and complete Javadoc comment. Class javadoc must
include the @author tag, and method
javadoc must include @param and @return tags as appropriate.
– Try to state what each method does in your own words, but
there is no rule against copying and
pasting the descriptions from this document or from the posted
javadoc.
– Run the javadoc tool and see what your documentation looks
like! You do not have to turn in
the generated html, but at least it provides some satisfaction :)
• All variable names must be meaningful (i.e., named for the
value they store).
• Your code should not be producing console output. You may
add println statements when debug-
ging, but you need to remove them before submitting the code.
• Internal (//-style) comments are normally used inside of
method bodies to explain how something
works, while the Javadoc comments explain what a method
does. (A good rule of thumb is: if you
had to think for a few minutes to figure out how something
works, you should probably include a
comment explaining how it works.)
– Internal comments always precede the code they describe and
are indented to the same level. In
a simple homework like this one, as long as your code is
straightforward and you use meaningful
variable names, your code will probably not need many internal
comments.
• Use a consistent style for indentation and formatting.
– Note that you can set up Eclipse with the formatting style you
prefer and then use Ctrl-Shift-F to
format your code. To play with the formatting preferences, go
to Window→Preferences→Java→Code
Style→Formatter and click the New button to create your own
profile for formatting.
If you have questions
For questions, please see the Piazza Q & A pages and click on
the folder assignment2. If you don’t find
your question answered, then create a new post with your
question. Try to state the question or topic clearly
in the title of your post, and attach the tag assignment2. But
remember, do not post any source code for the
classes that are to be turned in. It is fine to post source code for
general Java examples that are not being
turned in. (In the Piazza editor, use the button labeled “pre” to
have Java code formatted the way you typed
it.)
If you have a question that absolutely cannot be asked without
showing part of your source code, make
the post “private” so that only the instructors and TAs can see
it. Be sure you have stated a specific question;
vague requests of the form “read all my code and tell me what’s
wrong with it” will generally be ignored.
Of course, the instructors and TAs are always available to help
you. See the Office Hours section of the
syllabus to find a time that is convenient for you. We do our
best to answer every question carefully, short
of actually writing your code for you, but it would be unfair for
the staff to fully review your assignment in
detail before it is turned in.
Any posts from the instructors on Piazza that are labeled
“Official Clarification” are considered to be
part of the spec, and you may lose points if you ignore them.
Such posts will always be placed in the
Announcements section of the course page in addition to the Q
& A page. (We promise that no official
clarifications will be posted within 24 hours of the due date.)
What to turn in
Please submit, on Canvas, the zip file that is created by the
SpecChecker. The file, SUBMIT THIS hw2.zip,
will be located in the directory you selected when you ran the
SpecChecker. It should contain one directory,
hw2, which in turn contains one file, TennisMatch.java. Please
LOOK at the file you upload and make sure
it is the right one!
Submit the zip file to Canvas using the Assignment 2
submission link and verify that your submission
was successful. If you are not sure how to do this, see the
document “Assignment Submission HOWTO”
which can be found in the Piazza pinned messages.
We recommend that you submit the zip file as created by the
specchecker. If necessary for some reason,
you can create a zip file yourself. The zip file must contain the
directory hw2, which in turn should contain
the file TennisMatch.java. You can accomplish this by zipping
up the src directory of your project. The
file must be a zip file, so be sure you are using the Windows or
Mac zip utility, and NOT a third-party
installation of WinRAR, 7-zip, or Winzip
EFE MatrixExternal Strategic FactorsWeight (0.0–1.0; 0=n.docx

More Related Content

Similar to EFE MatrixExternal Strategic FactorsWeight (0.0–1.0; 0=n.docx

MT_01_unittest_python.pdf
MT_01_unittest_python.pdfMT_01_unittest_python.pdf
MT_01_unittest_python.pdfHans Jones
 
O CPAN tem as ferramentas que você precisa para fazer TDD em Perl, o Coding D...
O CPAN tem as ferramentas que você precisa para fazer TDD em Perl, o Coding D...O CPAN tem as ferramentas que você precisa para fazer TDD em Perl, o Coding D...
O CPAN tem as ferramentas que você precisa para fazer TDD em Perl, o Coding D...Rodolfo Carvalho
 
Test Driven Development with PHPUnit
Test Driven Development with PHPUnitTest Driven Development with PHPUnit
Test Driven Development with PHPUnitMindfire Solutions
 
Leveling Up With Unit Testing - php[tek] 2023
Leveling Up With Unit Testing - php[tek] 2023Leveling Up With Unit Testing - php[tek] 2023
Leveling Up With Unit Testing - php[tek] 2023Mark Niebergall
 
Load Testing with PHP and RedLine13
Load Testing with PHP and RedLine13Load Testing with PHP and RedLine13
Load Testing with PHP and RedLine13Jason Lotito
 
Introduction to Unit Testing with PHPUnit
Introduction to Unit Testing with PHPUnitIntroduction to Unit Testing with PHPUnit
Introduction to Unit Testing with PHPUnitMichelangelo van Dam
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good TestsTomek Kaczanowski
 
Testing basics for developers
Testing basics for developersTesting basics for developers
Testing basics for developersAnton Udovychenko
 
Fighting Fear-Driven-Development With PHPUnit
Fighting Fear-Driven-Development With PHPUnitFighting Fear-Driven-Development With PHPUnit
Fighting Fear-Driven-Development With PHPUnitJames Fuller
 
Leveling Up With Unit Testing - LonghornPHP 2022
Leveling Up With Unit Testing - LonghornPHP 2022Leveling Up With Unit Testing - LonghornPHP 2022
Leveling Up With Unit Testing - LonghornPHP 2022Mark Niebergall
 
Must.kill.mutants. TopConf Tallinn 2016
Must.kill.mutants. TopConf Tallinn 2016Must.kill.mutants. TopConf Tallinn 2016
Must.kill.mutants. TopConf Tallinn 2016Gerald Muecke
 
Grails unit testing
Grails unit testingGrails unit testing
Grails unit testingpleeps
 
Building unit tests correctly with visual studio 2013
Building unit tests correctly with visual studio 2013Building unit tests correctly with visual studio 2013
Building unit tests correctly with visual studio 2013Dror Helper
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to javaciklum_ods
 
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMockUnit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMockRobot Media
 
Building unit tests correctly
Building unit tests correctlyBuilding unit tests correctly
Building unit tests correctlyDror Helper
 
Advance unittest
Advance unittestAdvance unittest
Advance unittestReza Arbabi
 
15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)
15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)
15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)Danny Preussler
 

Similar to EFE MatrixExternal Strategic FactorsWeight (0.0–1.0; 0=n.docx (20)

Testing 101
Testing 101Testing 101
Testing 101
 
MT_01_unittest_python.pdf
MT_01_unittest_python.pdfMT_01_unittest_python.pdf
MT_01_unittest_python.pdf
 
O CPAN tem as ferramentas que você precisa para fazer TDD em Perl, o Coding D...
O CPAN tem as ferramentas que você precisa para fazer TDD em Perl, o Coding D...O CPAN tem as ferramentas que você precisa para fazer TDD em Perl, o Coding D...
O CPAN tem as ferramentas que você precisa para fazer TDD em Perl, o Coding D...
 
Test Driven Development with PHPUnit
Test Driven Development with PHPUnitTest Driven Development with PHPUnit
Test Driven Development with PHPUnit
 
Leveling Up With Unit Testing - php[tek] 2023
Leveling Up With Unit Testing - php[tek] 2023Leveling Up With Unit Testing - php[tek] 2023
Leveling Up With Unit Testing - php[tek] 2023
 
Load Testing with PHP and RedLine13
Load Testing with PHP and RedLine13Load Testing with PHP and RedLine13
Load Testing with PHP and RedLine13
 
Introduction to Unit Testing with PHPUnit
Introduction to Unit Testing with PHPUnitIntroduction to Unit Testing with PHPUnit
Introduction to Unit Testing with PHPUnit
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests
 
Testing basics for developers
Testing basics for developersTesting basics for developers
Testing basics for developers
 
Fighting Fear-Driven-Development With PHPUnit
Fighting Fear-Driven-Development With PHPUnitFighting Fear-Driven-Development With PHPUnit
Fighting Fear-Driven-Development With PHPUnit
 
Leveling Up With Unit Testing - LonghornPHP 2022
Leveling Up With Unit Testing - LonghornPHP 2022Leveling Up With Unit Testing - LonghornPHP 2022
Leveling Up With Unit Testing - LonghornPHP 2022
 
Must.kill.mutants. TopConf Tallinn 2016
Must.kill.mutants. TopConf Tallinn 2016Must.kill.mutants. TopConf Tallinn 2016
Must.kill.mutants. TopConf Tallinn 2016
 
Grails unit testing
Grails unit testingGrails unit testing
Grails unit testing
 
Building unit tests correctly with visual studio 2013
Building unit tests correctly with visual studio 2013Building unit tests correctly with visual studio 2013
Building unit tests correctly with visual studio 2013
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
 
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMockUnit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
 
Unit testing
Unit testingUnit testing
Unit testing
 
Building unit tests correctly
Building unit tests correctlyBuilding unit tests correctly
Building unit tests correctly
 
Advance unittest
Advance unittestAdvance unittest
Advance unittest
 
15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)
15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)
15 tips to improve your unit tests (Droidcon Berlin 2016 Barcamp)
 

More from gidmanmary

Using C#, write a program to find the nearest common parent of any t.docx
Using C#, write a program to find the nearest common parent of any t.docxUsing C#, write a program to find the nearest common parent of any t.docx
Using C#, write a program to find the nearest common parent of any t.docxgidmanmary
 
Using autoethnography in a qualitative research,consider a resid.docx
Using autoethnography in a qualitative research,consider a resid.docxUsing autoethnography in a qualitative research,consider a resid.docx
Using autoethnography in a qualitative research,consider a resid.docxgidmanmary
 
Using Earned Value to Determine StatusJennifer turned in her statu.docx
Using Earned Value to Determine StatusJennifer turned in her statu.docxUsing Earned Value to Determine StatusJennifer turned in her statu.docx
Using Earned Value to Determine StatusJennifer turned in her statu.docxgidmanmary
 
Using at least your textbook and a minimum of three additional sourc.docx
Using at least your textbook and a minimum of three additional sourc.docxUsing at least your textbook and a minimum of three additional sourc.docx
Using at least your textbook and a minimum of three additional sourc.docxgidmanmary
 
Using APA style format, write a 4-5 page paper describing the provis.docx
Using APA style format, write a 4-5 page paper describing the provis.docxUsing APA style format, write a 4-5 page paper describing the provis.docx
Using APA style format, write a 4-5 page paper describing the provis.docxgidmanmary
 
Use the organization you selected in Week One and the Security Ass.docx
Use the organization you selected in Week One and the Security Ass.docxUse the organization you selected in Week One and the Security Ass.docx
Use the organization you selected in Week One and the Security Ass.docxgidmanmary
 
Using DuPont analysis is a quick and relatively easy way to assess t.docx
Using DuPont analysis is a quick and relatively easy way to assess t.docxUsing DuPont analysis is a quick and relatively easy way to assess t.docx
Using DuPont analysis is a quick and relatively easy way to assess t.docxgidmanmary
 
Using APA style, prepare written research paper of 4 double spaced p.docx
Using APA style, prepare written research paper of 4 double spaced p.docxUsing APA style, prepare written research paper of 4 double spaced p.docx
Using APA style, prepare written research paper of 4 double spaced p.docxgidmanmary
 
Use the organization selected for your Managing Change Paper Part .docx
Use the organization selected for your Managing Change Paper Part .docxUse the organization selected for your Managing Change Paper Part .docx
Use the organization selected for your Managing Change Paper Part .docxgidmanmary
 
Use your knowledge to develop the circumstances and details involved.docx
Use your knowledge to develop the circumstances and details involved.docxUse your knowledge to develop the circumstances and details involved.docx
Use your knowledge to develop the circumstances and details involved.docxgidmanmary
 
Use the percentage method to compute the federal income taxes to w.docx
Use the percentage method to compute the federal income taxes to w.docxUse the percentage method to compute the federal income taxes to w.docx
Use the percentage method to compute the federal income taxes to w.docxgidmanmary
 
Use the textbook andor online sources to locate and capture three w.docx
Use the textbook andor online sources to locate and capture three w.docxUse the textbook andor online sources to locate and capture three w.docx
Use the textbook andor online sources to locate and capture three w.docxgidmanmary
 
Use the Web to conduct research on User Domain Security Policy and A.docx
Use the Web to conduct research on User Domain Security Policy and A.docxUse the Web to conduct research on User Domain Security Policy and A.docx
Use the Web to conduct research on User Domain Security Policy and A.docxgidmanmary
 
Use this Article to create the powerpoint slidesBrown, S. L., No.docx
Use this Article to create the powerpoint slidesBrown, S. L., No.docxUse this Article to create the powerpoint slidesBrown, S. L., No.docx
Use this Article to create the powerpoint slidesBrown, S. L., No.docxgidmanmary
 
use the work sheet format made available  but only to give brief, bu.docx
use the work sheet format made available  but only to give brief, bu.docxuse the work sheet format made available  but only to give brief, bu.docx
use the work sheet format made available  but only to give brief, bu.docxgidmanmary
 
Use these three sources to compose an annotated bibliography on Data.docx
Use these three sources to compose an annotated bibliography on Data.docxUse these three sources to compose an annotated bibliography on Data.docx
Use these three sources to compose an annotated bibliography on Data.docxgidmanmary
 
Use this outline to crete a four page essay. Guideline included and .docx
Use this outline to crete a four page essay. Guideline included and .docxUse this outline to crete a four page essay. Guideline included and .docx
Use this outline to crete a four page essay. Guideline included and .docxgidmanmary
 
Use the link provided to complete a self-assessment. After completin.docx
Use the link provided to complete a self-assessment. After completin.docxUse the link provided to complete a self-assessment. After completin.docx
Use the link provided to complete a self-assessment. After completin.docxgidmanmary
 
Use the SPSS software and the data set (2004)GSS.SAV (attached).docx
Use the SPSS software and the data set (2004)GSS.SAV (attached).docxUse the SPSS software and the data set (2004)GSS.SAV (attached).docx
Use the SPSS software and the data set (2004)GSS.SAV (attached).docxgidmanmary
 
Use the Internet to research functional systems that would contain a.docx
Use the Internet to research functional systems that would contain a.docxUse the Internet to research functional systems that would contain a.docx
Use the Internet to research functional systems that would contain a.docxgidmanmary
 

More from gidmanmary (20)

Using C#, write a program to find the nearest common parent of any t.docx
Using C#, write a program to find the nearest common parent of any t.docxUsing C#, write a program to find the nearest common parent of any t.docx
Using C#, write a program to find the nearest common parent of any t.docx
 
Using autoethnography in a qualitative research,consider a resid.docx
Using autoethnography in a qualitative research,consider a resid.docxUsing autoethnography in a qualitative research,consider a resid.docx
Using autoethnography in a qualitative research,consider a resid.docx
 
Using Earned Value to Determine StatusJennifer turned in her statu.docx
Using Earned Value to Determine StatusJennifer turned in her statu.docxUsing Earned Value to Determine StatusJennifer turned in her statu.docx
Using Earned Value to Determine StatusJennifer turned in her statu.docx
 
Using at least your textbook and a minimum of three additional sourc.docx
Using at least your textbook and a minimum of three additional sourc.docxUsing at least your textbook and a minimum of three additional sourc.docx
Using at least your textbook and a minimum of three additional sourc.docx
 
Using APA style format, write a 4-5 page paper describing the provis.docx
Using APA style format, write a 4-5 page paper describing the provis.docxUsing APA style format, write a 4-5 page paper describing the provis.docx
Using APA style format, write a 4-5 page paper describing the provis.docx
 
Use the organization you selected in Week One and the Security Ass.docx
Use the organization you selected in Week One and the Security Ass.docxUse the organization you selected in Week One and the Security Ass.docx
Use the organization you selected in Week One and the Security Ass.docx
 
Using DuPont analysis is a quick and relatively easy way to assess t.docx
Using DuPont analysis is a quick and relatively easy way to assess t.docxUsing DuPont analysis is a quick and relatively easy way to assess t.docx
Using DuPont analysis is a quick and relatively easy way to assess t.docx
 
Using APA style, prepare written research paper of 4 double spaced p.docx
Using APA style, prepare written research paper of 4 double spaced p.docxUsing APA style, prepare written research paper of 4 double spaced p.docx
Using APA style, prepare written research paper of 4 double spaced p.docx
 
Use the organization selected for your Managing Change Paper Part .docx
Use the organization selected for your Managing Change Paper Part .docxUse the organization selected for your Managing Change Paper Part .docx
Use the organization selected for your Managing Change Paper Part .docx
 
Use your knowledge to develop the circumstances and details involved.docx
Use your knowledge to develop the circumstances and details involved.docxUse your knowledge to develop the circumstances and details involved.docx
Use your knowledge to develop the circumstances and details involved.docx
 
Use the percentage method to compute the federal income taxes to w.docx
Use the percentage method to compute the federal income taxes to w.docxUse the percentage method to compute the federal income taxes to w.docx
Use the percentage method to compute the federal income taxes to w.docx
 
Use the textbook andor online sources to locate and capture three w.docx
Use the textbook andor online sources to locate and capture three w.docxUse the textbook andor online sources to locate and capture three w.docx
Use the textbook andor online sources to locate and capture three w.docx
 
Use the Web to conduct research on User Domain Security Policy and A.docx
Use the Web to conduct research on User Domain Security Policy and A.docxUse the Web to conduct research on User Domain Security Policy and A.docx
Use the Web to conduct research on User Domain Security Policy and A.docx
 
Use this Article to create the powerpoint slidesBrown, S. L., No.docx
Use this Article to create the powerpoint slidesBrown, S. L., No.docxUse this Article to create the powerpoint slidesBrown, S. L., No.docx
Use this Article to create the powerpoint slidesBrown, S. L., No.docx
 
use the work sheet format made available  but only to give brief, bu.docx
use the work sheet format made available  but only to give brief, bu.docxuse the work sheet format made available  but only to give brief, bu.docx
use the work sheet format made available  but only to give brief, bu.docx
 
Use these three sources to compose an annotated bibliography on Data.docx
Use these three sources to compose an annotated bibliography on Data.docxUse these three sources to compose an annotated bibliography on Data.docx
Use these three sources to compose an annotated bibliography on Data.docx
 
Use this outline to crete a four page essay. Guideline included and .docx
Use this outline to crete a four page essay. Guideline included and .docxUse this outline to crete a four page essay. Guideline included and .docx
Use this outline to crete a four page essay. Guideline included and .docx
 
Use the link provided to complete a self-assessment. After completin.docx
Use the link provided to complete a self-assessment. After completin.docxUse the link provided to complete a self-assessment. After completin.docx
Use the link provided to complete a self-assessment. After completin.docx
 
Use the SPSS software and the data set (2004)GSS.SAV (attached).docx
Use the SPSS software and the data set (2004)GSS.SAV (attached).docxUse the SPSS software and the data set (2004)GSS.SAV (attached).docx
Use the SPSS software and the data set (2004)GSS.SAV (attached).docx
 
Use the Internet to research functional systems that would contain a.docx
Use the Internet to research functional systems that would contain a.docxUse the Internet to research functional systems that would contain a.docx
Use the Internet to research functional systems that would contain a.docx
 

Recently uploaded

Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 

Recently uploaded (20)

TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 

EFE MatrixExternal Strategic FactorsWeight (0.0–1.0; 0=n.docx

  • 1. EFE Matrix External Strategic Factors Weight (0.0–1.0; 0=not important, 0.5=somewhat important, and 1.0=important) Rating (1–4; 1=poor and 4=good) Weighted Score (multiply weight by rating) Comments (additional observations) Opportunities: Threats: 1 META-INF/MANIFEST.MF Manifest-Version: 1.0
  • 2. Created-By: 11.0.1 (Oracle Corporation) Main-Class: hw2.SpecChecker .DS_Store hw2/Generate.classpackage hw2; publicsynchronizedclass Generate { public void Generate(); publicstatic void main(String[]) throws ClassNotFoundException; } hw2/SpecChecker$1.classpackage hw2; synchronizedclass SpecChecker$1 implements Runnable { void SpecChecker$1(); public void run(); } hw2/SpecChecker.classpackage hw2; publicsynchronizedclass SpecChecker { private TennisMatch tm; public void SpecChecker(); publicstatic void main(String[]); public void initializationError(); public void setup(); public void testInitial1(); public void testInitial3(); public void testInitial4();
  • 3. public void testInitial7(); public void testInitial8(); public void testInitial9(); public void testInitial10(); public void testGame1a(); public void testGame1b(); public void testGame1c(); public void testGame1d(); public void testGame1e(); public void testGame2a(); public void testGame2b(); public void testGame2c(); public void testGame2d(); public void testGame2e(); public void testGame3a(); public void testGame3b(); public void testGame3c(); public void testGame3d(); public void testGame3e(); public void testGame4a(); public void testGame4b(); public void testGame4c(); public void testGame4d(); public void testGame4e(); public void testGame5a(); public void testGame5b(); public void testGame5c(); public void testGame5d(); public void testGame5e(); publicstatic String getModifierDiff(int, int); privatestatic String getTypesList(Class[]); public void testForClasses() throws Exception; public void testHw2TennisMatch() throws Exception; }
  • 4. speccheck/desktop.ini [.ShellClassInfo] InfoTip=This folder is shared online. IconFile=C:Program FilesGoogleDrivegoogledrivesync.exe IconIndex=16 speccheck/LatestSpecCheckClassLoader.classpackage speccheck; publicsynchronizedclass LatestSpecCheckClassLoader extends java.net.URLClassLoader { public void LatestSpecCheckClassLoader(String) throws java.net.MalformedURLException; public Class loadClass(String) throws ClassNotFoundException; } speccheck/SpecCheck$1.classpackage speccheck; synchronizedclass SpecCheck$1 extends SecurityManager { void SpecCheck$1(); public void checkPermission(java.security.Permission); } speccheck/SpecCheck$2.classpackage speccheck; synchronizedclass SpecCheck$2 implements Runnable { void SpecCheck$2(Class, String, String, String[]); public void run(); }
  • 5. speccheck/SpecCheck.classpackage speccheck; publicsynchronizedclass SpecCheck { publicstaticfinal SecurityManager noExit; static void <clinit>(); private void SpecCheck(); publicstatic String grade(Class); publicstatic String test(Class); publicstatic String test(Class, String, int); publicstatictransient void testAndZip(Class, String, String, String[]); privatestatictransient void testAndZipHelper(Class, String, String, String[]); publicstatictransient void run(Class, String, String, java.io.File, String[]); privatestatic boolean zip(String, String[], String) throws java.io.IOException; privatestatic boolean addSourceFile(String, String, java.util.zip.ZipOutputStream, byte[]) throws java.io.IOException; publicstatic boolean hasOccludingSpecCheckers(String); } speccheck/SpecCheckEvaluator$1.classpackage speccheck; synchronizedclass SpecCheckEvaluator$1 extends java.io.OutputStream { void SpecCheckEvaluator$1(); public void write(int); } speccheck/SpecCheckEvaluator.classpackage speccheck; publicsynchronizedclass SpecCheckEvaluator { public void SpecCheckEvaluator(); publicstatic String evaluateTests(Class, String, int); }
  • 6. speccheck/SpecCheckGenerator$ModifierName.classpackage speccheck; finalsynchronizedenum SpecCheckGenerator$ModifierName { publicstaticfinal SpecCheckGenerator$ModifierName Public; publicstaticfinal SpecCheckGenerator$ModifierName Private; publicstaticfinal SpecCheckGenerator$ModifierName Protected; publicstaticfinal SpecCheckGenerator$ModifierName Final; publicstaticfinal SpecCheckGenerator$ModifierName Interface; publicstaticfinal SpecCheckGenerator$ModifierName Abstract; publicstaticfinal SpecCheckGenerator$ModifierName Static; static void <clinit>(); private void SpecCheckGenerator$ModifierName(String, int); publicstatic SpecCheckGenerator$ModifierName[] values(); publicstatic SpecCheckGenerator$ModifierName valueOf(String); } speccheck/SpecCheckGenerator.classpackage speccheck; publicsynchronizedclass SpecCheckGenerator { public void SpecCheckGenerator(); publictransient void testClasses(String[]) throws ClassNotFoundException; publictransient void genClassExistenceTest(String[]); private void genClassTest(String) throws ClassNotFoundException; private void genFieldCountTest(String) throws ClassNotFoundException; private void genClassModifiersTest(String) throws ClassNotFoundException;
  • 7. private void genClassSuperTest(String) throws ClassNotFoundException; private void genClassInterfacesTest(String) throws ClassNotFoundException; private void genUnspecifiedMethodsTests(String, reflect.Method[]); private void genUnspecifiedConstructorsTests(String, reflect.Constructor[]) throws ClassNotFoundException; private void genUnspecifiedFieldsTests(String, reflect.Field[]) throws ClassNotFoundException; private void genSpecifiedMethodsTests(String, reflect.Method[]); private void genSpecifiedConstructorsTests(String, reflect.Constructor[]); private void genSpecifiedFieldsTests(String, reflect.Field[]); privatestatic void checkModifier(SpecCheckGenerator$ModifierName); privatestatic void genModifierCompare(); privatestatic String getReadableClassName(String); privatestatic String getTypesList(Class[]); privatestatic void genGetTypesList(); } speccheck/SpecCheckRunListener.classpackage speccheck; publicsynchronizedclass SpecCheckRunListener extends org.junit.runner.notification.RunListener { private java.util.HashMap testToResults; private java.util.HashMap testToMsg; private int nPointsPossible; public void SpecCheckRunListener(); public void testStarted(org.junit.runner.Description); public void testFailure(org.junit.runner.notification.Failure); public String getMsg(org.junit.runner.notification.Failure); public int getScore(); public int getScorePossible();
  • 8. } speccheck/SpecCheckTest.classpackage speccheck; publicabstractinterface SpecCheckTest extends annotation.Annotation { publicabstract int nPoints(); publicabstract int order(); publicabstract String msg(); } speccheck/SpecCheckTestComparator.classpackage speccheck; synchronizedclass SpecCheckTestComparator implements java.util.Comparator { void SpecCheckTestComparator(); public int compare(org.junit.runner.Description, org.junit.runner.Description); } speccheck/SpecCheckUtilities.classpackage speccheck; publicsynchronizedclass SpecCheckUtilities { publicstaticfinal boolean PRINT_STACK_TRACES = 1; public void SpecCheckUtilities(); publicstatic reflect.Method getMethod(org.junit.runner.Description) throws SecurityException, NoSuchMethodException, ClassNotFoundException; publicstatic String getClassName(org.junit.runner.Description); publicstatic String getMethodName(org.junit.runner.Description); publicstatic java.util.regex.Matcher methodStringMatcher(org.junit.runner.Description); publicstatic void printPartialStackTrace(Throwable, String,
  • 9. java.io.PrintStream); } speccheck/Specified.classpackage speccheck; publicabstractinterface Specified extends annotation.Annotation { publicabstract boolean checkSuper(); publicabstract boolean allowUnspecifiedPublicDefaultCtor(); publicabstract boolean allowUnspecifiedPublicConstants(); publicabstract boolean allowUnspecifiedPublicStuff(); publicabstract int maxVariableCount(); publicabstract Class[] mustThrow(); publicabstract Class[] mustNotThrow(); publicabstract Class[] mustImplement(); } COM S 227 Fall 2019 Homework 2: Anyone for Tennis? 200 points Due Date: Saturday, October 12, 11:59 pm (midnight) 5% bonus for submitting 1 day early (by 11:59 pm October 11) 10% penalty for submitting 1 day late (by 11:59 pm October 13) No submissions accepted after October 13, 11:59 pm General Information This assignment is to be done on your own. See the Academic Dishonesty policy in the syllabus,
  • 10. http://www.cs.iastate.edu/ cs227/syllabus.html#ad , for details. You will not be able to submit your work unless you have completed the Academic Dishonesty policy acknowledgement on the Homework page on Canvas. Please do this right away. If you need help, see your instructor or one of the TAs. Lots of help is also available through the Piazza discussions. Please start the assignment as soon as possible and get your questions answered right away. It is physi- cally impossible for the staff to provide individual help to everyone the night that the assignment is due! This is a “regular” assignment so we are going to read your code. Your score will be based partly (about a third) on the specchecker’s functional tests and partly on the grader’s assessment of the quality of your code. See the “More about grading” section. Tips from the experts: How to waste a lot of time on this assignment • Start the assignment the day it’s due. That way, if you have questions, the TAs will be too busy to help you and you can blame the staff when you get a bad grade. • Don’t bother reading the rest of this document, or even the specification, especially the “Getting started” section. Documentation is for chumps. • Don’t test your code. It’s such fun to remain in suspense until you get your score! • The main guiding principle is: Try to write all the code before you figure out what it’s supposed to do.
  • 11. Overview The goals of this assignment are to give you more experience writing classes from specifications and to provide you with practive working with conditionals. For this assignment you will implement one class, called TennisMatch, that models the serving, end- changing, and scoring of a best-of-three or best-of-five, advantage sets tennis match. Your class will keep track of scores, server, ends, and faults, games, sets, and match. Additionally, provided for you is a TennisPlayer class. Using it reduces some of the complexity of TennisMatch. You should use—but should not modify— TennisPlayer. Specification The specification for this assignment includes this pdf, the TennisMatch javadocs, the official rules of Tennis (the 2019 Friend of the Court, linked on Piazza) along with any “official” clarifications posted on Piazza. http://www.cs.iastate.edu/~cs227/syllabus.html#ad Where’s the main() method?? There isn’t one! Like most Java classes, this isn’t a complete program and you can’t “run” it by itself. It’s just a single class, that is, the definition for a type of object that might be part of a larger system. To try out your class, you can write a test class with a main method such the example provided (on Piazza) in TestTennisMatch.java.
  • 12. There will also be a SpecChecker (not ready yet) that will perform a lot of functional tests, but when you are developing and debugging your code at first you’ll always want to have some simple test cases of your own as in the main method above. Note that neither the SpecChecker nor the provided test program nor the combination of the pair provide complete, comprehensive test coverage of your TennisMatch implementation. You will have to write your own tests. Sample usage A good way to think about the specification is to try to write some simple test cases and think about what behavior you expect to see. The included TestTennisMatch class implements a main method which tests much—but not all—of the functionality. It plays a complete first set, then modifies the score to “jump” to the last set and finish the match. There is also a SpecChecker (see below) that will perform a lot of functional tests, but when you are developing and debugging your code at first you’ll always want to have some simple test cases of your own as in the main method in TestTennisMatch.java. Suggestions for getting started Smart developers don’t try to write all the code and then try to find dozens of errors all at once; they work incrementally and test every new feature as it’s written. Here is a rough guide for how an experienced coder might go about creating a class such as this one:
  • 13. • Create a new, empty project and add a package called hw2. • Create the TennisMatch class in the hw2 package and put in stubs for all the required methods and constructors. For methods that are required to return a value, just put in a “dummy” return statement that returns zero or false. • Download the specchecker, import it into your project as you did in labs 1 and 2, and run it. There will be lots of error messages appearing in the console output, since you haven’t actually implemented the methods yet. Always start reading from the top. All you really want to check at this point is whether you have a missing or extra public method, if the method declarations are incorrect, or if something is really wrong like the class having the incorrect name or package. Any such errors will appear first in the output and will usually say “Class does not conform to specification.” • Look at each method. Mentally classify it as either an accessor (returns some information without modifying the object) or a mutator (modifies the object, usually returning void). The accessors will give you a lot of hints about what instance variables you need. • Before you write code for a method, always write a simple usage example or test case, similar to the main method in the provided test code. This will make sure you understand what the code is really supposed to do, and it will give later you a way to check whether you did it correctly. Of course, if you are really not sure what a method is supposed to do, bring up your question for discussion on
  • 14. Piazza! • It would probably be best to start with the accessors, as they’ll help you ascertain what instances variables to expect. The mutators should also be fairly straightforward and provide insights into the necessary instance variables. • The bulk of the work occurs in increment*Points, where * is one of Game, Set, and Match. These must not only increment the particular point, but also control other aspects of game start, like switch- ing server, switching ends, and ending the game. Furthermore, incrementGamePoints must call incrementSetPoints under certain conditions, and that in turn calls incrementMatchPoints under other conditions. Friend of the Court The rules of tennis that we will be implementing in this simulation are restricted to only a few sections of the Friend of the Court. These sections should be considered part of the specification of this assignment: • Section 5a for scoring of games • Section 6a for scoring of sets • Section 7 for scoring of matches • Section 10 for changing of ends • Section 14 for order of service • Section 23 for description of the let Additionally, it may be benefitial to read other sections of the Friend of the Court for context and termi-
  • 15. nology; however, we will not be implementing rules described outside of the above sections. For instance, we will not be implementing tie-break sets, described in Section 6b and elsewhere. Additional notes • No loops are needed—nor likely helpful—for this assignment. You will, however, need many condi- tional expressions. • Do not add any additional public methods; you may add your own methods if you feel compelled to do so, but they must be declared private. Do not create any additional Java classes. The SpecChecker You can find the SpecChecker online; see the Piazza Homework post for the link. Import and run the SpecChecker just as you practiced in Labs 1 and 2. It will run a number of functional tests and then bring up a dialog offering to create a zip file to submit. Remember that error messages will appear in the console output. There are many test cases so there may be an overwhelming number of error messages. Always start reading the errors at the top and make incremental corrections in the code to fix them. When you are happy with your results, click “Yes” at the dialog to create the zip file. See the document “SpecChecker HOWTO”, which can be found in the Piazza pinned messages More about grading This is a “regular” assignment so we are going to read your code. Your score will be based partly (about
  • 16. a third) on the specchecker’s functional tests and partly on the grader’s assessment of the quality of your code. This means you can get partial credit even if you have errors, and it also means that even if you pass all the specchecker tests you can still lose points. Are you doing things in a simple and direct way that makes sense? Are you defining redundant instance variables? Some specific criteria that are important for this assignment are: • Use instance variables only for the “permanent” state of the object, use local variables for temporary calculations within methods. – You will lose points for having lots of unnecessary instance variables – All instance variables should be private. • Accessor methods should not modify instance variables. See the “Style and documentation” section below for additional guidelines. Style and documentation Roughly 15% of the points will be for documentation and code style. Here are some general requirements and guidelines: • Each class, method, constructor and instance variable, whether public or private, must have a mean- ingful and complete Javadoc comment. Class javadoc must include the @author tag, and method javadoc must include @param and @return tags as appropriate.
  • 17. – Try to state what each method does in your own words, but there is no rule against copying and pasting the descriptions from this document or from the posted javadoc. – Run the javadoc tool and see what your documentation looks like! You do not have to turn in the generated html, but at least it provides some satisfaction :) • All variable names must be meaningful (i.e., named for the value they store). • Your code should not be producing console output. You may add println statements when debug- ging, but you need to remove them before submitting the code. • Internal (//-style) comments are normally used inside of method bodies to explain how something works, while the Javadoc comments explain what a method does. (A good rule of thumb is: if you had to think for a few minutes to figure out how something works, you should probably include a comment explaining how it works.) – Internal comments always precede the code they describe and are indented to the same level. In a simple homework like this one, as long as your code is straightforward and you use meaningful variable names, your code will probably not need many internal comments. • Use a consistent style for indentation and formatting. – Note that you can set up Eclipse with the formatting style you prefer and then use Ctrl-Shift-F to
  • 18. format your code. To play with the formatting preferences, go to Window→Preferences→Java→Code Style→Formatter and click the New button to create your own profile for formatting. If you have questions For questions, please see the Piazza Q & A pages and click on the folder assignment2. If you don’t find your question answered, then create a new post with your question. Try to state the question or topic clearly in the title of your post, and attach the tag assignment2. But remember, do not post any source code for the classes that are to be turned in. It is fine to post source code for general Java examples that are not being turned in. (In the Piazza editor, use the button labeled “pre” to have Java code formatted the way you typed it.) If you have a question that absolutely cannot be asked without showing part of your source code, make the post “private” so that only the instructors and TAs can see it. Be sure you have stated a specific question; vague requests of the form “read all my code and tell me what’s wrong with it” will generally be ignored. Of course, the instructors and TAs are always available to help you. See the Office Hours section of the syllabus to find a time that is convenient for you. We do our best to answer every question carefully, short of actually writing your code for you, but it would be unfair for the staff to fully review your assignment in detail before it is turned in. Any posts from the instructors on Piazza that are labeled “Official Clarification” are considered to be
  • 19. part of the spec, and you may lose points if you ignore them. Such posts will always be placed in the Announcements section of the course page in addition to the Q & A page. (We promise that no official clarifications will be posted within 24 hours of the due date.) What to turn in Please submit, on Canvas, the zip file that is created by the SpecChecker. The file, SUBMIT THIS hw2.zip, will be located in the directory you selected when you ran the SpecChecker. It should contain one directory, hw2, which in turn contains one file, TennisMatch.java. Please LOOK at the file you upload and make sure it is the right one! Submit the zip file to Canvas using the Assignment 2 submission link and verify that your submission was successful. If you are not sure how to do this, see the document “Assignment Submission HOWTO” which can be found in the Piazza pinned messages. We recommend that you submit the zip file as created by the specchecker. If necessary for some reason, you can create a zip file yourself. The zip file must contain the directory hw2, which in turn should contain the file TennisMatch.java. You can accomplish this by zipping up the src directory of your project. The file must be a zip file, so be sure you are using the Windows or Mac zip utility, and NOT a third-party installation of WinRAR, 7-zip, or Winzip