Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Java: Wing Class Lab Please elp me finish the remaining requirement of the lab,

ID: 3884020 • Letter: J

Question

Java: Wing Class Lab

Please elp me finish the remaining requirement of the lab, thank you! I will rate the answer!

I have attached the lab requirment and the code I have below:

public class RectangularWing implements AirDensity
{
private double span;
private double chord;
private double vCruise;
private double vStall;
private double cLiftMax;
private double cLiftCruise;
private int altitudeTO;
private int altitudeCruise;

public RectangularWing(double s, double c,double vC,double vS, double cLmax, double cLcruise, int altTO, int altC)

{
span = s; chord = c;
vCruise = vC * 1.689;
vStall = vS * 1.689;
cLiftMax = cLmax;
cLiftCruise = cLcruise;
altitudeTO = altTO;
altitudeCruise = altC;
}

public double q(int mode)
{
double rho = 0;
double v = 0;

if (mode == TAKEOFF)
{
rho = AIR_DENSITY[altitudeTO];
v = vStall*1.3;
}
else
{
rho = AIR_DENSITY [altitudeCruise];
v = vCruise;
}
return 0.5*rho*(v*v);
}

public static void main(String[] args)
{
RectangularWing w = new RectangularWing( 30, 4.6, 120, 45,1.4, 0.3, 0,3);
System.out.println(w.q(TAKEOFF));
}
}  

Build and test the Wing class using Java Your class should have the following fields Field NameDescription span chord vCruise vStall cLiftMax cLiftCruise altitudeTO altitudeCruise Cruise altitude index (0-20 Wing span in feet Wing chord in feet Table of standard day, and hot day atmosphere density. In slugs Cruise speed in feet per second (fps). Knots x 1.689 = f Stall speed in fps Maximum lift coefficient. Dimensionless Cruise lift coefficient. Usually found at L/D max in airfoil datasheet. Dimensionless Take off altitude index (0-20 Your class should have the following methods Dynamic Pressure, q Variable Name Description Rho. Density of air at given altitude. Standard or hot da Velocity in fps. Knots x 1.689 fps amic pressure Total Lift (lbs.) Tota!Lift = span * chord * q * CL. Cu is the appropriate lift coefficient. Note that span * chord is wing area Wing Loading (lbs. /square foot) WingLoading = Tota Lift / WingArea

Explanation / Answer

public interface AirDensity {

double AIR_DENSITY[]= {0.002378,0.002309194,0.002241921,0.002176195};//in interface all variables are public final so no need to decalre

//them as final variables

int TAKEOFF=0;

int CRUISE=1;

}

public class RectangularWing implements AirDensity {

private double span;

private double chord;

private double vCruise;

private double vStall;

private double cLiftMax;

private double cLiftCruise;

private int altitudeTO;

private int altitudeCruise;

public RectangularWing(double s, double c, double vC, double vS, double cLmax, double cLcruise, int altTO, int altC)

{

span = s;

chord = c;

vCruise = vC * 1.689;

vStall = vS * 1.689;

cLiftMax = cLmax;

cLiftCruise = cLcruise;

altitudeTO = altTO;

altitudeCruise = altC;

}

public double q(int mode) {

double rho = 0;

double v = 0;

if (mode == TAKEOFF) {

rho = AIR_DENSITY[altitudeTO];

v = vStall * 1.3;

} else {

rho = AIR_DENSITY[altitudeCruise];

v = vCruise;

}

return 0.5 * rho * (v * v);

}

public double totalLift(int mode)

{

double lift=span*chord*q(mode)*cLiftCruise;

return lift;

}

public double wingLoading(int mode)

{

double loading=totalLift(mode)/(span*chord);

return loading;

}

public static void main(String[] args) {

RectangularWing w = new RectangularWing(30, 4.6, 120, 45, 1.4, 0.3, 0, 3);

System.out.println(w.q(TAKEOFF));

System.out.println(w.totalLift(TAKEOFF));

System.out.println(w.wingLoading(TAKEOFF));

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote