gabbi68 / dd2480_antimissilesystem Goto Github PK
View Code? Open in Web Editor NEWDD2480 assignment 1
DD2480 assignment 1
There exists at least one set of three data points separated by exactly C PTS and D PTS
consecutive intervening points, respectively, that form an angle such that:
angle < (PI−EPSILON) or angle > (PI+EPSILON).
The second point of the set of three points is always the vertex of the angle. If either the first
point or the last point (or both) coincide with the vertex, the angle is undefined and the LIC
is not satisfied by those three points
Create a code skeleton for the entire program where all the functions are declared.
There exists at least one set of two consecutive data points that are a distance greater than
the length, LENGTH1, apart.
(0 ≤ LENGTH1)
There exists at least one set of three data points, separated by exactly A PTS and B PTS
consecutive intervening points, respectively, that cannot be contained within or on a circle of
radius RADIUS1. In addition, there exists at least one set of three data points (which can be
the same or different from the three data points just mentioned) separated by exactly A PTS
and B PTS consecutive intervening points, respectively, that can be contained in or on a
circle of radius RADIUS2. Both parts must be true for the LIC to be true.
The condition is not met when NUMPOINTS < 5.
0 ≤ RADIUS2
Create the decide function that combine all the functions of the program and finally decides if a missile should be launched or not.
There exists at least one set of two data points, separated by exactly K PTS consecutive
intervening points, which are a distance greater than the length, LENGTH1, apart. In addition, there exists at least one set of two data points (which can be the same or different from
the two data points just mentioned), separated by exactly K PTS consecutive intervening
points, that are a distance less than the length, LENGTH2, apart. Both parts must be true
for the LIC to be true.
Test cases for LIC7
Test cases for LIC8
Create .md file for documentation.
Test cases for LIC1
Test cases for LIC12
A function which tells if three points are in or on a circle of a given radius.
Test for the circle function.
Test cases for the final DECIDE-function
There exists at least one set of two data points, (X[i],Y[i]) and (X[j],Y[j]), separated by
exactly G PTS consecutive intervening points, such that X[j] - X[i] < 0. (where i < j )
Test cases for LIC10
Test cases for LIC2
The loops in setFuv() only examines 14 elements, it should examine 15. Change the loop condition.
The boolean array fuv should also preferably be initialized for every run of setFuv(), otherwise the answers from previous tests (in the test file) will still be left in the array.
There exists at least one set of three data points separated by exactly E PTS and F PTS consecutive intervening points, respectively, that are the vertices of a triangle with area greater
than AREA1.
There exists at least one set of three consecutive data points that are the vertices of a triangle
with area greater than AREA1.
(0 ≤ AREA1)
Create Final Unlocking Vector (FUV)
Test cases for LIC6
Create the Preliminary Unlocking Matrix (PUM)
Test cases for LIC14
Test cases for LIC3
test for the pum matrix
Test cases for LIC9
There exists at least one set of three data points separated by exactly A PTS and B PTS
consecutive intervening points, respectively, that cannot be contained within or on a circle of
radius RADIUS1.
Test cases for LIC4
Test cases for LIC11
There exists at least one set of three consecutive data points that cannot all be contained
within or on a circle of radius RADIUS1.
(0 ≤ RADIUS1)
Create Conditions Met Vector (CMV)
There exists at least one set of N PTS consecutive data points such that at least one of the
points lies a distance greater than DIST from the line joining the first and last of these N PTS
points. If the first and last points of these N PTS are identical, then the calculated distance
to compare with DIST will be the distance from the coincident point to all other points of
the N PTS consecutive points. The condition is not met when NUMPOINTS < 3.
(3 ≤ N PTS ≤ NUMPOINTS), (0 ≤ DIST)
Refactor of scaninputline, buildcallback
Test cases for LIC13
There exists at least one set of Q PTS consecutive data points that lie in more than QUADS
quadrants. Where there is ambiguity as to which quadrant contains a given point, priority
of decision will be by quadrant number, i.e., I, II, III, IV. For example, the data point (0,0)
is in quadrant I, the point (-l,0) is in quadrant II, the point (0,-l) is in quadrant III, the point
(0,1) is in quadrant I and the point (1,0) is in quadrant I.
(2 ≤ Q PTS ≤ NUMPOINTS), (1 ≤ QUADS ≤ 3)
According to spec.
Test cases for LIC0
There are some leftover statements that returned true that is going to return false and some variables that are being checked are the wrong variable to check
There exists at least one set of two consecutive data points, (X[i],Y[i]) and (X[j],Y[j]), such
that X[j] - X[i] < 0. (where i = j-1)
Create all the global variables
There exists at least one set of three consecutive data points which form an angle such that:
angle < (PI−EPSILON)
or
angle > (PI+EPSILON)
The second of the three consecutive points is always the vertex of the angle. If either the first
point or the last point (or both) coincides with the vertex, the angle is undefined and the LIC
is not satisfied by those three points.
(0 ≤ EPSILON < PI)
Test cases for LIC5
There exists at least one set of two data points separated by exactly K PTS consecutive intervening points that are a distance greater than the length, LENGTH1, apart. The condition
is not met when NUMPOINTS < 3.
1 ≤ K PTS ≤ (NUMPOINTS−2)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.