/*  CLASS OCTAGON

DESCRIPTION:
Stores the attributes of an item into a single record. Contains the
item's ID number, its description, the quantity of item stored, the
price and also location in the warehouse. Class Record also keeps
track of the highest priced item.

--------------------------------------------------------------------------
*/
import java.util.*;
import java.io.*;
import java.lang.Exception;

public class Octagon extends GeometricObject
{
    private int sides;
    private int lengthOfSides;
    private BufferedReader input;
    
// ========================= default constructor =======================
    public Octagon() throws IOException
    {
            // This zero arg constructor places default values when
            // the class Record is instantiated with no values passed
            sides = 8;
            readSide();
    }
    
// ============================ constructor ============================
    public Octagon(int i, String de, int qu, double pri, Location lo) throws IOException
    {
            // Reads in the item ID, item description, quantity of
            // item, price of item, and the location (object) of
            // the item
    
    }
    
    public double findArea()
    {
        double calc = (2+4/(Math.pow(2,.5))) * sides * sides;
        return calc;
    }
    
    public double findPerimeter()
    {
        return 0.0;
    }
    
    public int readSide() throws IOException
    {
        input = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("Enter a side value: ");
        int sideRead = Integer.parseInt(input.readLine());
        
        return sideRead;
    }
}   // End of public class Octagon
