Question: Requires knowledge of connecting to mySQL databes using java. Writting superclasses and using subclasses $100usd bonus through PayPal if answered correctly. No later than 4/26/18

Requires knowledge of connecting to mySQL databes using java. Writting superclasses and using subclasses

$100usd bonus through PayPal if answered correctly. No later than 4/26/18 11:00 pm USA eastern time for response. Comment for more infonation if needed.

This java program will be connecting to a MySQL database called stormtroopeer_java. Using abstracts classes and interfaces.

Create the java project Assigment2[LastName] which contains the main class [LastName].

Utilizing the UML diagrams provided and the data in the stormtrooper_java database create the following classes and objects based on their class description utilizing the data in the database.

Stormtroopers

1000 Stormtrooper objects

Stormtrooper Units

25 StormtrooperUnit objects

All Stormtrooper objects must be contained in an ArrayList stormtroopers

All StormtrooperUnit objects must be contained in an ArrayList stormtrooperunits

Stormtroopers(Abstract)

(subclasses)

StormtrooperUnit(abstract)

(subclasses)

create a DBSupport class

-connect to database

- provides properties

-connection object

-look query

-set result

Requires knowledge of connecting to mySQL databes using java. Writting superclasses and

using subclasses $100usd bonus through PayPal if answered correctly. No later than

4/26/18 11:00 pm USA eastern time for response. Comment for more infonation

if needed. This java program will be connecting to a MySQL database

called stormtroopeer_java. Using abstracts classes and interfaces. Create the java project Assigment2[LastName]

which contains the main class [LastName]. Utilizing the UML diagrams provided and

the data in the stormtrooper_java database create the following classes and objects

based on their class description utilizing the data in the database. Stormtroopers

Databases structure

CREATE TABLE stormtrooper_unit(

STUID CHAR(10) NOT NULL,

UnitCmd CHAR(5) NOT NULL,

UnitType ENUM('Infantry','Aslt Infantry','Reconnaissance') NOT NULL DEFAULT 'Infantry',

AssignedStrength INT NOT NULL DEFAULT 100,

Location_X INT NOT NULL,

Location_Y INT NOT NULL,

CONSTRAINT pk_stu PRIMARY KEY(STUID),

CONSTRAINT fk_stu FOREIGN KEY(UnitCmd) REFERENCES imperial_battlegroup(BGID)

);

SELECT 'Stormtrooper Units Created' AS MSG;

CREATE TABLE stormtroopers_officer(

STID CHAR(6) NOT NULL,

Rank ENUM('LT','CAPT','CMDR') NOT NULL,

Gender ENUM('Male','Female') NOT NULL DEFAULT 'Male',

ServiceYears INT NOT NULL DEFAULT 3,

Height INT NOT NULL DEFAULT 76,

Weight INT NOT NULL DEFAULT 215,

DutyCategory ENUM('Active','Reserve') NOT NULL DEFAULT 'Active',

DutyStatus ENUM('Full Duty','Wounded','Killed') NOT NULL DEFAULT 'Full Duty',

CONSTRAINT pk_stoff PRIMARY KEY(STID)

);

SELECT 'Stormtrooper Officers Created' AS MSG;

CREATE TABLE st_officer_assign(

STID CHAR(6) NOT NULL,

STUID CHAR(10) NOT NULL,

Role ENUM('Trooper','Communications','Medical','Demolitions','Scout','Assault') NOT NULL DEFAULT 'Trooper',

CONSTRAINT pk_sto_assign PRIMARY KEY(STID),

CONSTRAINT fk_sto_assign1 FOREIGN KEY(STID) REFERENCES stormtroopers_officer(STID),

CONSTRAINT fk_sto_assign2 FOREIGN KEY(STUID) REFERENCES stormtrooper_unit(STUID)

);

SELECT 'Stormtrooper Officer Assignments Created' AS MSG;

CREATE TABLE stormtroopers_nco(

STID CHAR(6) NOT NULL,

Rank ENUM('CPL','SGT','MSGT') NOT NULL,

Gender ENUM('Male','Female') NOT NULL DEFAULT 'Male',

ServiceYears INT NOT NULL DEFAULT 3,

Height INT NOT NULL DEFAULT 76,

Weight INT NOT NULL DEFAULT 215,

DutyCategory ENUM('Active','Reserve') NOT NULL DEFAULT 'Active',

DutyStatus ENUM('Full Duty','Wounded','Killed') NOT NULL DEFAULT 'Full Duty',

CONSTRAINT pk_stnco PRIMARY KEY(STID)

);

SELECT 'Stormtrooper NCOs Created' AS MSG;

CREATE TABLE st_nco_assign(

STID CHAR(6) NOT NULL,

STUID CHAR(10) NOT NULL,

Role ENUM('Trooper','Communications','Medical','Demolitions','Scout','Assault') NOT NULL DEFAULT 'Trooper',

CONSTRAINT pk_stnco_assign PRIMARY KEY(STID),

CONSTRAINT fk_stnco_assign1 FOREIGN KEY(STID) REFERENCES stormtroopers_nco(STID),

CONSTRAINT fk_stnco_assign2 FOREIGN KEY(STUID) REFERENCES stormtrooper_unit(STUID)

);

SELECT 'Stormtrooper NCO Assignments Created' AS MSG;

CREATE TABLE stormtroopers_troop(

STID CHAR(6) NOT NULL,

Rank ENUM('TRPR','SP') NOT NULL,

Gender ENUM('Male','Female') NOT NULL DEFAULT 'Male',

ServiceYears INT NOT NULL DEFAULT 1,

Height INT NOT NULL DEFAULT 76,

Weight INT NOT NULL DEFAULT 215,

DutyCategory ENUM('Active','Reserve') NOT NULL DEFAULT 'Active',

DutyStatus ENUM('Full Duty','Wounded','Killed') NOT NULL DEFAULT 'Full Duty',

CONSTRAINT pk_sttrp PRIMARY KEY(STID)

);

SELECT 'Stormtrooper Troops Created' AS MSG;

CREATE TABLE st_troop_assign(

STID CHAR(6) NOT NULL,

STUID CHAR(10) NOT NULL,

Role ENUM('Trooper','Communications','Medical','Demolitions','Scout','Assault') NOT NULL DEFAULT 'Trooper',

CONSTRAINT pk_sttroop_assign PRIMARY KEY(STID),

CONSTRAINT fk_sttroop_assign1 FOREIGN KEY(STID) REFERENCES stormtroopers_troop(STID),

CONSTRAINT fk_sttroop_assign2 FOREIGN KEY(STUID) REFERENCES stormtrooper_unit(STUID)

);

SELECT 'Stormtrooper Troop Assignments Created' AS MSG;

CREATE TABLE imperial_walker_type(

WTypeID CHAR(2) NOT NULL,

WType CHAR(5) NOT NULL,

Height INT NOT NULL,

Length INT NOT NULL,

Width INT NOT NULL,

Weight INT NOT NULL,

Crew INT NOT NULL,

TroopCapacity INT NOT NULL,

MaximumSpeed INT NOT NULL,

OpRange INT NOT NULL,

CONSTRAINT pk_iwt PRIMARY KEY(WTypeID),

CONSTRAINT uk_iwt UNIQUE KEY(WType)

);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!