Package jahuwaldt.aero.airfoils
Class NACAFactory
- java.lang.Object
-
- jahuwaldt.aero.airfoils.NACAFactory
-
public class NACAFactory extends java.lang.Object
This class contains a method for parsing a NACA airfoil designation string (such as "NACA 2312") and returning a corresponding Airfoil object.Modified by: Joseph A. Huwaldt
- Version:
- February 23, 2025
- Author:
- Joseph A. Huwaldt Date: October 20, 2000
-
-
Constructor Summary
Constructors Constructor Description NACAFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Airfoil
create(java.lang.String designation, double chord)
Returns an Airfoil object corresponding to the airfoil designation sting passed in.static void
main(java.lang.String[] args)
A simple method to test this class.
-
-
-
Constructor Detail
-
NACAFactory
public NACAFactory()
-
-
Method Detail
-
create
public static Airfoil create(java.lang.String designation, double chord) throws java.lang.IllegalArgumentException
Returns an Airfoil object corresponding to the airfoil designation sting passed in. For example, if "NACA 0012" or "0012" are passed in a NACA4Uncambered object is returned with a thickness of 12% toc.- Parameters:
designation
- The designation of the airfoil that is desired.chord
- The chord length for the airfoil.- Returns:
- An airfoil corresponding to the designation passed in.
- Throws:
java.lang.IllegalArgumentException
- if the designation is for an airfoil type that is unknown to this factory class.
-
main
public static void main(java.lang.String[] args)
A simple method to test this class.- Parameters:
args
- command-line arguments.
-
-