diff --git a/ImperialDroid.php b/ImperialDroid.php new file mode 100644 index 0000000..9822587 --- /dev/null +++ b/ImperialDroid.php @@ -0,0 +1,110 @@ + + + +ImperialDroid + + +

Imperialdroid Assignment

+IDNumber = $IDNumber; + $this->droidType = $droidType; + $this->height = $height; + $this->weight = $weight; + $this->manufacturer = $manufacturer; + } + + function get_IDNumber(){ + return $this->IDNumber; + } + + function set_IDNumber($ID){ + $this->IDNumber = $ID; + } + + function get_droidType(){ + return $this->droidType; + } + + function set_droidType($dT){ + $this->droidType = $dT; + } + + function get_height(){ + return $this->height; + } + + function set_height($h){ + $this->height = $h; + } + + function get_weight(){ + return $this->weight; + } + + function set_weight($w){ + $this->weight = $w; + } + + function get_manufacturer(){ + return $this->manufacturer; + } + + function set_manufacturer($m){ + $this->manufacturer = $m; + } + + function reportStatus(){ + echo "I am Imperial Droid ".$this->IDNumber." and all systems are functioning"; + } + + function movesToDestination($destination){ + echo $this->IDNumber." moving to"."$destination"; + } + + function communicates($msg){ + echo $msg; + } + + function flysTransport(){ + echo $this->IDNumber." flying Transport"; + } + + public static function compareDroids($d1,$d2){ + $d= ""; + if(strcmp($d1->get_IDNumber(),$d2->get_IDNumber())==0){ + $d = $d1->get_IDNumber()." and ".$d2->get_IDNumber()." are the same"; + } + else{ + $d = $d1->get_IDNumber()." and ".$d2->get_IDNumber()." are different"; + } + return $d; + } + + +} + +$DR1= new ImperialDroid("ImperialDroid1",76,230,25,3); +$DR2= new ImperialDroid("ImperialDroid2",75,220,22,4); +echo"

ID number: ".$DR1 -> get_IDNumber()."

"; +echo"

ID number: ".$DR2 -> get_IDNumber()."

"; +echo"

What can the ImperialDroid do?

"; +echo"

".$DR1 -> reportStatus()."

"; +echo"

".$DR1 -> movesToDestination(" Jersey City ")."

"; +echo"

".$DR2 -> communicates(" Reporting to the duty")."

"; +echo"

".$DR2 -> flysTransport()."

"; +echo"

".ImperialDroid::compareDroids($DR1,$DR2)."

"; + + ?> + + \ No newline at end of file diff --git a/PreetiLadwa.php b/PreetiLadwa.php index 31f393f..ff3f937 100644 --- a/PreetiLadwa.php +++ b/PreetiLadwa.php @@ -4,13 +4,201 @@ -

This is my Assignment 1

+

This is my Assignment 1

Function for sumAll

+

Function to count even number in an Array

+ + +

Function to count odd number in an Array

+ + +

Function to count average number in an Array

+ + +

Function that accepts an array of numbers and returns the smallest number

+ + +

Function that accepts an array of numbers and returns the largest number

+ + +

Function that accepts an array of numbers and returns the range between the numbers

+ +

Function that accepts an array of numbers and returns the median of the numbers

+ + +

Function that accepts an array of numbers and returns the mean of the numbers

+ + +

Function that accepts an array of numbers and returns the mode of the numbers

+ $v) { + if ($v == $x) { + $modes[] = $key; + } else { + break; + } + } + return $modes; + } + print_r(modes_of_array([1.0, 1.0, 2.0, 2.0, 3, 4])); +?> + +

Function that accepts an array of numbers and returns the sample Variation of the numbers

+ "; + echo "a[1] = $a[1]
"; + echo "a[2] = $a[2]
"; + echo "a[3] = $a[3]
"; + echo "a[4] = $a[4]
"; + echo "a[5] = $a[5]
"; + echo "the_sample_variance = $the_variance
"; + ?> + +

Function that accepts an array of numbers and returns the standard deviation of the numbers

+ + +

Euclidean 2D distance function

+ + +

Interquartile range function

+ \ No newline at end of file diff --git a/PreetiLadwaAssignment2.zip b/PreetiLadwaAssignment2.zip new file mode 100644 index 0000000..47ddff2 Binary files /dev/null and b/PreetiLadwaAssignment2.zip differ diff --git a/PreetiLadwaAssignment2/index.php b/PreetiLadwaAssignment2/index.php new file mode 100644 index 0000000..6ddfa64 --- /dev/null +++ b/PreetiLadwaAssignment2/index.php @@ -0,0 +1,31 @@ + + + +Assignment 03 + + + + +

Enter a list of five number

+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + + +
+ + diff --git a/PreetiLadwaAssignment2/results.php b/PreetiLadwaAssignment2/results.php new file mode 100644 index 0000000..fd9e623 --- /dev/null +++ b/PreetiLadwaAssignment2/results.php @@ -0,0 +1,54 @@ + + + +SumAll is = $x"; + +$y = contEvens($a); +echo"

EVEN is = $y

"; + +$z = contOdds($a); +echo"

Odd is = $z

"; + +$L = AvgAll($a); +echo"

Avg is = $L

"; + +$m = Minall($a); +echo"

Minimum is = $m

"; + +$n = Maxall($a); +echo"

Maximum is = $n

"; + +$o = rangeall($a); +echo"

Range is = $o

"; + +$p = medianAll($a); +echo"

Median is = $p

"; + +$q = midRangeAll($a); +echo"

Midrange is = $q

"; + +$r = sampleVariance($a); +echo"

Sample Variance is = $r

"; + +$s = standardDeviation($a); +echo"

Standard Deviation is = $s

"; + +$euclidean2DDistance = euclidean2DDistance(3,4,2,1); +echo "

Distance is = $euclidean2DDistance

"; +?> + + + + + + + + \ No newline at end of file diff --git a/PreetiLadwaAssignment2/stats.php b/PreetiLadwaAssignment2/stats.php new file mode 100644 index 0000000..6646d77 --- /dev/null +++ b/PreetiLadwaAssignment2/stats.php @@ -0,0 +1,102 @@ + + +

Functions in Php

+ $j){ + $sum+=$j; + } + return $sum; + + } + +function contEvens($v){ + $evens = 0; + foreach($v as$i=> $j){ + if($j % 2 == 0 && $j!=0){ + $evens +=1; + } + } + return $evens; + } + +function contOdds($v){ + $Odds = 0; + foreach($v as$i=> $j){ + if($j % 2 == 1){ + $Odds +=1; + } + } + return $Odds; + } + +function AvgAll($v){ + $total = 0; + foreach($v as $i){ + $total += $i; + } + return $total/count($v); +} + +function Minall($a) +{ + $n = count($a); + $min = $a[0]; + for ($i = 1; $i < $n; $i++) + if ($min > $a[$i]) + $min = $a[$i]; + return $min; +} + +function Maxall($a) +{ + $n = count($a); + $max = $a[0]; + for ($i = 1; $i < $n; $i++) + if ($max < $a[$i]) + $max = $a[$i]; + return $max; +} +function rangeall($a) +{ +return Maxall($a)- Minall($a); +} + +function medianAll($numbers) +{ +if (!is_array($numbers)) + $numbers = func_get_args(); + + rsort($numbers); + $mid = (count($numbers) / 2); + return ($mid % 2 != 0) ? $numbers[mid-1] + : (($numbers[$mid-1]) + $numbers[$mid]) / 2; +} + +function midRangeAll($a) +{ +return (Maxall($a)+Minall($a))/2; +} + +function sampleVariance($a){ + $sum = 0; + $mean = AvgAll($a); + for ($i=0; $i< count($a); $i++){ + $sum=$sum+($a[$i]-$mean); + } + return $sum/(count($a)-1); +} + +function standardDeviation($a){ + return sqrt(sampleVariance($a)); +} + +function euclidean2DDistance($x1,$y1,$x2,$y2) +{ + $EDdistance = sqrt(pow($x2- $x1, 2)+ + pow($y2 - $y1, 2) *1.0); + return $EDdistance; +} +?> + diff --git a/PreetiLadwaProject1.zip b/PreetiLadwaProject1.zip new file mode 100644 index 0000000..51e99e6 Binary files /dev/null and b/PreetiLadwaProject1.zip differ diff --git a/PreetiLadwaProject1/AFF_Population.sql b/PreetiLadwaProject1/AFF_Population.sql new file mode 100644 index 0000000..0c39e64 --- /dev/null +++ b/PreetiLadwaProject1/AFF_Population.sql @@ -0,0 +1,49 @@ +/* +Aerial Fire Fighting Database +Population Script +Project 1 IS 667 +Spring 2022 +HG Locklear +*/ + +USE aerialfirefighting; + +INSERT INTO aircraft VALUES ('DC-10','Heavy',876,21700,6500,12000); +INSERT INTO aircraft VALUES ('C-130','Medium',541,6900,3800,3000); +INSERT INTO aircraft VALUES ('P-3','Medium',607,2500,9200,3000); + + +INSERT INTO airfield VALUES ('AF-Alpha',2,12,10,11,'AFAlpha.png'); +INSERT INTO airfield VALUES ('AF-Beta',1,6,50,30,'AFBeta.png'); +INSERT INTO airfield VALUES ('AF-Gamma',2,10,80,20,'AFGamma.png'); +INSERT INTO airfield VALUES ('AF-Delta',1,9,20,80,'AFDelta.png'); +INSERT INTO airfield VALUES ('AF-Sigma',1,8,70,10,'AFSigma.png'); +INSERT INTO airfield VALUES ('AF-Tau',2,10,90,70,'AFTau.png'); + +INSERT INTO availableAircraft VALUES ('DC-10-1','DC-10','AF-Alpha','Ready'); +INSERT INTO availableAircraft VALUES ('DC-10-2','DC-10','AF-Alpha','Ready'); +INSERT INTO availableAircraft VALUES ('DC-10-3','DC-10','AF-Alpha','Ready'); +INSERT INTO availableAircraft VALUES ('P-3-1','P-3','AF-Beta','Ready'); +INSERT INTO availableAircraft VALUES ('P-3-2','P-3','AF-Beta','Ready'); +INSERT INTO availableAircraft VALUES ('P-3-3','P-3','AF-Beta','Ready'); +INSERT INTO availableAircraft VALUES ('P-3-4','P-3','AF-Sigma','Ready'); +INSERT INTO availableAircraft VALUES ('P-3-5','P-3','AF-Sigma','Ready'); +INSERT INTO availableAircraft VALUES ('P-3-6','P-3','AF-Sigma','Ready'); +INSERT INTO availableAircraft VALUES ('C-130-1','C-130','AF-Delta','Ready'); +INSERT INTO availableAircraft VALUES ('C-130-2','C-130','AF-Delta','Ready'); +INSERT INTO availableAircraft VALUES ('C-130-3','C-130','AF-Gamma','Ready'); +INSERT INTO availableAircraft VALUES ('C-130-4','C-130','AF-Gamma','Ready'); + +INSERT INTO fireTarget (FireID,FireLocation,FireStatus,FireSize) +VALUES ('Fire-1','Sector-1','Uncontained','Large'); +INSERT INTO fireTarget (FireID,FireLocation,FireStatus,FireSize) +VALUES ('Fire-2','Sector-2','Out','Small'); +INSERT INTO fireTarget (FireID,FireLocation,FireStatus,FireSize) +VALUES ('Fire-3','Sector-3','Contained','Medium'); +INSERT INTO fireTarget (FireID,FireLocation,FireStatus,FireSize) +VALUES ('Fire-4','Sector-4','Uncontained','Very Large'); + +INSERT INTO location VALUES ('Sector-1','Grass','Flat',400,200); +INSERT INTO location VALUES ('Sector-2','Grass','Hilly',800,700); +INSERT INTO location VALUES ('Sector-3','Bush','Broken',600,400); +INSERT INTO location VALUES ('Sector-4','Trees','Hilly',900,100); \ No newline at end of file diff --git a/PreetiLadwaProject1/Data_Aircraft.php b/PreetiLadwaProject1/Data_Aircraft.php new file mode 100644 index 0000000..94b5fea --- /dev/null +++ b/PreetiLadwaProject1/Data_Aircraft.php @@ -0,0 +1,48 @@ + + + +aerial fire fighting</head> + +

Fire Fighting Aircraft

+ + query("SELECT * from aircraft where ACModel = '$Airmod'"); + + if($result->num_rows > 0){ + while($row = $result->fetch_assoc()) + $aircraft_obj= new aircraft($row["ACModel"], $row["ACType"], $row["FlightSpeed"], + $row["FuelCapacity"], $row["MissionRange"], $row["WaterCapacity"]); + + echo "

" .$aircraft_obj->displayAircraft(). "

"; + } + else { + echo"

Data not found

"; + } + } +} + + /*Close Database*/ + mysqli_close($dbcon); + + ?> + + + diff --git a/PreetiLadwaProject1/Data_Airfields.php b/PreetiLadwaProject1/Data_Airfields.php new file mode 100644 index 0000000..6932f24 --- /dev/null +++ b/PreetiLadwaProject1/Data_Airfields.php @@ -0,0 +1,44 @@ + + +aerial fire fighting</head> + +

Fire Fighting Airfields

+ + query("SELECT * from airfield where AFID = '$AID'"); + + if($result->num_rows > 0){ + while($row = $result->fetch_assoc()) + $airfield_obj= new airfield($row["AFID"], $row["Runways"], $row["Hangers"], + $row["LOC_LAT"], $row["LOC_LON"]); + + echo "

" .$airfield_obj->displayAirfield(). "

"; + } + else { + echo"

Data not found

"; + } + } +} + mysqli_close($connectiontodatabase); + + ?> + + + \ No newline at end of file diff --git a/PreetiLadwaProject1/Data_Fires.php b/PreetiLadwaProject1/Data_Fires.php new file mode 100644 index 0000000..0573a6c --- /dev/null +++ b/PreetiLadwaProject1/Data_Fires.php @@ -0,0 +1,49 @@ + + + +aerial fire fighting</head> + +

Targeted Fires

+ + query("SELECT * from fireTarget where FireID = '$FirID'"); + + if($result->num_rows > 0){ + while($row = $result->fetch_assoc()) + $fireTarget_obj= new fireTarget($row["FireNumber"],$row["FireID"], $row["FireLocation"], $row["FireStatus"],$row["FireSize"]); + + echo "

" .$fireTarget_obj->displayFireTarget(). "

"; + } + else { + echo"

Data not found

"; + } + } +} + /*Close Database*/ + mysqli_close($dbcon); + + ?> + + + diff --git a/PreetiLadwaProject1/Location.php b/PreetiLadwaProject1/Location.php new file mode 100644 index 0000000..2731de9 --- /dev/null +++ b/PreetiLadwaProject1/Location.php @@ -0,0 +1,26 @@ + + +Aerial Fire Fighting + +LID = $LID; + $this->vegetation = $vegetation; + $this->terrain = $terrain; + $this->LOC_lat = $LOC_lat; + $this->LOC_long = $LOC_long; + } + +} +?> + + diff --git a/PreetiLadwaProject1/Project1.sql b/PreetiLadwaProject1/Project1.sql new file mode 100644 index 0000000..7779831 --- /dev/null +++ b/PreetiLadwaProject1/Project1.sql @@ -0,0 +1,58 @@ +DROP DATABASE IF EXISTS aerialfirefighting; +CREATE DATABASE aerialfirefighting; +USE aerialfirefighting; + +/*TABLE CREATION FOR Aircraft*/ +DROP TABLE IF EXISTS Aircraft; +CREATE TABLE Aircraft( +ACModel VARCHAR(100), +ACType VARCHAR(100), +FlightSpeed INT, +FuelCapacity INT, +MissionRange INT, +WaterCapacity INT, +CONSTRAINT pk_ACModel PRIMARY KEY(ACModel)); + +DROP TABLE IF EXISTS Airfield; +CREATE TABLE Airfield( +AFID VARCHAR(100), +Runways INT, +Hangers INT, +LOC_LAT INT, +LOC_LON INT, +Image VARCHAR(100), +CONSTRAINT pk_Airfield PRIMARY KEY(AFID), +CONSTRAINT uk_Airfield UNIQUE KEY (LOC_LAT), +CONSTRAINT uk_Airfield1 UNIQUE KEY (LOC_LON)); + + +DROP TABLE IF EXISTS AvailableAircraft; +CREATE TABLE AvailableAircraft( +ACID VARCHAR(50), +ACModel VARCHAR(100), +AFAssigned VARCHAR(100), +ACStatus ENUM('Ready','Not Ready') NOT NULL, +CONSTRAINT pk_AvailAir PRIMARY KEY(ACID), +CONSTRAINT fk_AvailAircraft FOREIGN KEY(ACModel) REFERENCES Aircraft(ACModel), +CONSTRAINT fk_AvailAircraft1 FOREIGN KEY(AFAssigned) REFERENCES Airfield(AFID)); + +DROP TABLE IF EXISTS FireTarget; +CREATE TABLE FireTarget( +FireNumber INT NOT NULL AUTO_INCREMENT, +FireID VARCHAR(25) NOT NULL, +FireLocation VARCHAR(100), +FireStatus ENUM('Uncontained','Contained','Out'), +FireSize ENUM('Small','Medium','Large','Very Large'), +CONSTRAINT pk_FireNum PRIMARY KEY(FireNumber), +CONSTRAINT uk_FireTarget UNIQUE KEY(FireLocation)); + +DROP TABLE IF EXISTS Location; +CREATE TABLE Location( +LocationID VARCHAR(25), +Vegetation ENUM('Grass','Bush','Trees') NOT NULL, +Terrain ENUM('Flat','Hilly','Broken') NOT NULL, +LOC_LAT INT, +LOC_LONG INT, +CONSTRAINT pk_Location PRIMARY KEY(LocationID), +CONSTRAINT uk_LLat UNIQUE KEY(LOC_LAT), +CONSTRAINT UK_LLong UNIQUE KEY(LOC_LONG)); diff --git a/PreetiLadwaProject1/aircraft.php b/PreetiLadwaProject1/aircraft.php new file mode 100644 index 0000000..5e693f5 --- /dev/null +++ b/PreetiLadwaProject1/aircraft.php @@ -0,0 +1,37 @@ + + +Aerial Fire Fighting + +model = $model; + $this->type = $type; + $this->flightSpd = $flightSpd; + $this->fuelCap = $fuelCap; + $this->missionRng = $missionRng; + $this->waterCap = $waterCap; + } + + function displayAircraft(){ + echo'

Aircraft Model
       ' .$this->model. '

'; + echo'

Aircraft Type
       ' .$this->type. '

'; + echo'

Flight Speed
       ' .$this->flightSpd. 'mph

'; + echo'

Fuel Capacity
        ' .$this->fuelCap.'lbs

'; + echo'

Mission Range
       '.$this->missionRng.'miles

'; + echo'

Water Capacity
        '.$this->waterCap.'gallons

'; + } +} +?> + + diff --git a/PreetiLadwaProject1/airfields.php b/PreetiLadwaProject1/airfields.php new file mode 100644 index 0000000..bbae0ad --- /dev/null +++ b/PreetiLadwaProject1/airfields.php @@ -0,0 +1,49 @@ + + +Aerial Fire Fighting + + +AFID = $AFID; + $this->runways = $runways; + $this->hangers = $hangers ; + $this->LOC_LAT = $LOC_LAT ; + $this->LOC_LON = $LOC_LON ; + } + + + function displayAirfield(){ + + + echo'

Aircraft Model
       '.$this->AFID. '

'; + echo'

Aircraft Type
       ' .$this->runways. '

'; + echo'

Flight Speed
       ' .$this->hangers. ' mph

'; + echo'

Fuel Capacity
        ' .$this->LOC_LAT.' lbs

'; + echo'

Mission Range
       '.$this->LOC_LON.' miles

'; + + + } + +} + + +?> + + + + \ No newline at end of file diff --git a/PreetiLadwaProject1/firetarget.php b/PreetiLadwaProject1/firetarget.php new file mode 100644 index 0000000..8f02e5e --- /dev/null +++ b/PreetiLadwaProject1/firetarget.php @@ -0,0 +1,33 @@ + + +Aerial Fire Fighting + +number = $FireNumber; + $this->ID = $FireID; + $this->location = $FireLocation; + $this->status = $Firestatus; + $this->size = $FireSize; + } + + function displayFireTarget(){ + echo'

Fire Number
       ' .$this->FireNumber. '

'; + echo'

Fire ID
       ' .$this->FireID. '

'; + echo'

Fire Location
       ' .$this->FireLocation. 'mph

'; + echo'

Fire Status
        ' .$this->FireStatus.'lbs

'; + echo'

Fire Size
       '.$this->FireSize.'miles

'; + + } +} +?> + + diff --git a/PreetiLadwaProject1/index.php b/PreetiLadwaProject1/index.php new file mode 100644 index 0000000..30f9fd3 --- /dev/null +++ b/PreetiLadwaProject1/index.php @@ -0,0 +1,34 @@ + + +Aerial Fire Fighting + +

Fires

+
+
+
+
+
+
+
+ +

Airfields

+
+
+
+
+
+
+
+ +

Aircraft

+
+
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/PreetiLadwaProject2/BInventory.php b/PreetiLadwaProject2/BInventory.php new file mode 100644 index 0000000..e3e8bf2 --- /dev/null +++ b/PreetiLadwaProject2/BInventory.php @@ -0,0 +1,32 @@ + + + + +
+ +

+ TIE Attack Fighter +

+
+
+ + + +
+
+ + + + + \ No newline at end of file diff --git a/PreetiLadwaProject2/B_TIE.jpeg b/PreetiLadwaProject2/B_TIE.jpeg new file mode 100644 index 0000000..49c176e Binary files /dev/null and b/PreetiLadwaProject2/B_TIE.jpeg differ diff --git a/PreetiLadwaProject2/EmpireLogo.png b/PreetiLadwaProject2/EmpireLogo.png new file mode 100644 index 0000000..ddc3c8e Binary files /dev/null and b/PreetiLadwaProject2/EmpireLogo.png differ diff --git a/PreetiLadwaProject2/IInventory.php b/PreetiLadwaProject2/IInventory.php new file mode 100644 index 0000000..5f74bd3 --- /dev/null +++ b/PreetiLadwaProject2/IInventory.php @@ -0,0 +1,27 @@ + + + + +
+ +

+ TIE Interceptor +

+
+ + + + +
+
+ + + + + \ No newline at end of file diff --git a/PreetiLadwaProject2/I_TIE.jpeg b/PreetiLadwaProject2/I_TIE.jpeg new file mode 100644 index 0000000..d3eef52 Binary files /dev/null and b/PreetiLadwaProject2/I_TIE.jpeg differ diff --git a/PreetiLadwaProject2/SInventory.php b/PreetiLadwaProject2/SInventory.php new file mode 100644 index 0000000..dd1342d --- /dev/null +++ b/PreetiLadwaProject2/SInventory.php @@ -0,0 +1,27 @@ + + + + +
+ +

+ TIE Fighter +

+
+ + + + +
+
+ + + + + \ No newline at end of file diff --git a/PreetiLadwaProject2/SVInventory.php b/PreetiLadwaProject2/SVInventory.php new file mode 100644 index 0000000..8e390b0 --- /dev/null +++ b/PreetiLadwaProject2/SVInventory.php @@ -0,0 +1,27 @@ + + + + +
+ +

+ TIE Stealth Fighter +

+
+ + + + +
+
+ + + + + \ No newline at end of file diff --git a/PreetiLadwaProject2/SV_TIE.jpeg b/PreetiLadwaProject2/SV_TIE.jpeg new file mode 100644 index 0000000..eb22814 Binary files /dev/null and b/PreetiLadwaProject2/SV_TIE.jpeg differ diff --git a/PreetiLadwaProject2/S_TIE.jpeg b/PreetiLadwaProject2/S_TIE.jpeg new file mode 100644 index 0000000..1eb25e6 Binary files /dev/null and b/PreetiLadwaProject2/S_TIE.jpeg differ diff --git a/PreetiLadwaProject2/TIE_B.php b/PreetiLadwaProject2/TIE_B.php new file mode 100644 index 0000000..39d77a2 --- /dev/null +++ b/PreetiLadwaProject2/TIE_B.php @@ -0,0 +1,27 @@ + + + + +
+ +

+ TIE Attack Fighter +

+
+ + + + +
+
+ + + + + \ No newline at end of file diff --git a/PreetiLadwaProject2/TIE_I.php b/PreetiLadwaProject2/TIE_I.php new file mode 100644 index 0000000..e5179ce --- /dev/null +++ b/PreetiLadwaProject2/TIE_I.php @@ -0,0 +1,27 @@ + + + + +
+ +

+ TIE Interceptor +

+
+ + + + +
+
+ + + + + \ No newline at end of file diff --git a/PreetiLadwaProject2/TIE_S.php b/PreetiLadwaProject2/TIE_S.php new file mode 100644 index 0000000..865f8fc --- /dev/null +++ b/PreetiLadwaProject2/TIE_S.php @@ -0,0 +1,27 @@ + + + + +
+ +

+ TIE Fighter +

+
+ + + + +
+
+ + + + + \ No newline at end of file diff --git a/PreetiLadwaProject2/TIE_SV.php b/PreetiLadwaProject2/TIE_SV.php new file mode 100644 index 0000000..70aae9b --- /dev/null +++ b/PreetiLadwaProject2/TIE_SV.php @@ -0,0 +1,27 @@ + + + + +
+ +

+ TIE Stealth Fighter +

+
+ + + + +
+
+ + + + + \ No newline at end of file diff --git a/PreetiLadwaProject2/TieFighter.php b/PreetiLadwaProject2/TieFighter.php new file mode 100644 index 0000000..a3b7b6f --- /dev/null +++ b/PreetiLadwaProject2/TieFighter.php @@ -0,0 +1,56 @@ +fModel = $fModel; + $this->fClass = $fClass; + $this->fCost = $fCost; + $this->fManufacturer = $fManufacturer; + $this->fLength = $fLength; + $this->fWidth = $fWidth; + $this->fHeight = $fHeight; + $this->fMass = $fMass; + $this->fCrew = $fCrew; + $this->fMaxSpeed = $fMaxSpeed; + $this->fMaxClimb = $fMaxClimb; + $this->fArmament = $fArmament; + $this->fPropulsion = $fPropulsion; + $this->fHull = $fHull; + } + + function displayFighter(){ + echo "

Model: ".$this->fModel."

"; + echo "

Class: ".$this->fClass."

"; + echo "

Cost: ".$this->fCost."

"; + echo "

Manufacturer: ".$this->fManufacturer."

"; + echo "

Length: ".$this->fLength."

"; + echo "

Width: ".$this->fWidth."

"; + echo "

Height: ".$this->fHeight."

"; + echo "

Mass: ".$this->fMass."

"; + echo "

Crew: ".$this->fCrew."

"; + echo "

MaxSpeed: ".$this->fMaxSpeed."

"; + echo "

fMaxClimb: ".$this->fMaxClimb."

"; + echo "

Armament: ".$this->fArmament."

"; + echo "

Propulsion: ".$this->fPropulsion."

"; + echo "

Hull: ".$this->fHull."

"; + + + } + +} \ No newline at end of file diff --git a/PreetiLadwaProject2/TieFighter_B.php b/PreetiLadwaProject2/TieFighter_B.php new file mode 100644 index 0000000..3524328 --- /dev/null +++ b/PreetiLadwaProject2/TieFighter_B.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/PreetiLadwaProject2/TieFighter_I.php b/PreetiLadwaProject2/TieFighter_I.php new file mode 100644 index 0000000..b2912cf --- /dev/null +++ b/PreetiLadwaProject2/TieFighter_I.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/PreetiLadwaProject2/TieFighter_S.php b/PreetiLadwaProject2/TieFighter_S.php new file mode 100644 index 0000000..a21617a --- /dev/null +++ b/PreetiLadwaProject2/TieFighter_S.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/PreetiLadwaProject2/TieFighter_SV.php b/PreetiLadwaProject2/TieFighter_SV.php new file mode 100644 index 0000000..bf56af5 --- /dev/null +++ b/PreetiLadwaProject2/TieFighter_SV.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/PreetiLadwaProject2/index.php b/PreetiLadwaProject2/index.php new file mode 100644 index 0000000..f315298 --- /dev/null +++ b/PreetiLadwaProject2/index.php @@ -0,0 +1,46 @@ + + + + + + Index page + +

Project 2 Created by HG Locklear IS-667 Spring 2022

+

Imperial TIE Spacecraft Construction Facility

+
+ +
+ + + + + + + + +

+ + + +

+
+ +
+
+
+ +
+
+
+ +
+
+ + + \ No newline at end of file diff --git a/PreetiLadwaProject2/tieFighter.sql b/PreetiLadwaProject2/tieFighter.sql new file mode 100644 index 0000000..ac372c3 --- /dev/null +++ b/PreetiLadwaProject2/tieFighter.sql @@ -0,0 +1,66 @@ +CREATE DATABASE tieFighter; + +USE tieFighter; + +/*creating tables for the database*/ +DROP TABLE IF EXISTS tieModel; +CREATE TABLE tieModel( +Model VARCHAR(50), +Class VARCHAR(50), +Cost INT, +Manufacturer ENUM('Sienar Industries','Other Industries'), +CONSTRAINT PK_TM PRIMARY KEY(Model) +); + +DROP TABLE IF EXISTS tieSpecifications; +CREATE TABLE tieSpecifications( +Model VARCHAR(50), +Length INT, +Width INT, +Height INT, +Mass INT, +Crew INT, +CONSTRAINT FK_TS FOREIGN KEY(Model) REFERENCES tieModel(Model) +); + +DROP TABLE IF EXISTS tiePerformance; +CREATE TABLE tiePerformance( +Model VARCHAR(50), +MaxSpeed INT, +MaxClimb INT, +CONSTRAINT FK_TP FOREIGN KEY(Model) REFERENCES tieModel(Model) +); + +DROP TABLE IF EXISTS tiePropulsion; +CREATE TABLE tiePropulsion( +Model VARCHAR(50), +Propulsion ENUM('Ion Engine','Hyper Ion Engine','Tri-Ion Engine'), +CONSTRAINT FK_TP1 FOREIGN KEY(Model) REFERENCES tieModel(Model) +); + +DROP TABLE IF EXISTS tieConstruction; +CREATE TABLE tieConstruction( +Model VARCHAR(50), +Hull ENUM('Durian Alloy','Alanium Graphite','Enhanced Alanium Graphite'), +CONSTRAINT FK_TC FOREIGN KEY(Model) REFERENCES tieModel(Model) +); + +DROP TABLE IF EXISTS tieArmament; +CREATE TABLE tieArmament( +Model VARCHAR(50), +CannonType ENUM('L1 Laser','L1A1 Laser','L2 Laser'), +Cannons INT, +InternalOrdnance ENUM('None','Proton Bombs'), +OrdnanceCount INT, +CONSTRAINT FK_TA FOREIGN KEY(Model) REFERENCES tieModel(Model) +); + +DROP TABLE IF EXISTS tieInventory; +CREATE TABLE tieInventory( +TFID VARCHAR(50), +Model VARCHAR(50), +Status ENUM('Damaged','Operational','Destroyed'), +CONSTRAINT PK_TI PRIMARY KEY(TFID), +CONSTRAINT FK_TI FOREIGN KEY(Model) REFERENCES tieModel(Model) +); +