Permalink
Browse files

Initial code commit

  • Loading branch information...
1 parent 94d92a9 commit a2e4ad6700abd98b472862d65a5625ffee75d649 phillf committed May 12, 2012
Showing with 431 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +75 −0 nbproject/Package-Default.bash
  3. +39 −0 nbproject/configurations.xml
  4. +23 −0 nbproject/project.xml
  5. +2 −0 src/Makefile
  6. +8 −0 src/areacalc.cpp
  7. +18 −0 src/calculations.h
  8. +15 −0 src/compile.sh
  9. +18 −0 src/header.h
  10. +36 −0 src/paralellogram.h
  11. +36 −0 src/rectangle.h
  12. +36 −0 src/rhombus.h
  13. +36 −0 src/square.h
  14. +49 −0 src/trapezoid.h
  15. +39 −0 src/triangle.h
View
@@ -0,0 +1 @@
+/nbproject/private/
@@ -0,0 +1,75 @@
+#!/bin/bash -x
+
+#
+# Generated - do not edit!
+#
+
+# Macros
+TOP=`pwd`
+CND_PLATFORM=GNU-MacOSX
+CND_CONF=Default
+CND_DISTDIR=dist
+CND_BUILDDIR=build
+NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
+TMPDIRNAME=tmp-packaging
+OUTPUT_PATH=MissingOutputInProject
+OUTPUT_BASENAME=MissingOutputInProject
+PACKAGE_TOP_DIR=areacalc/
+
+# Functions
+function checkReturnCode
+{
+ rc=$?
+ if [ $rc != 0 ]
+ then
+ exit $rc
+ fi
+}
+function makeDirectory
+# $1 directory path
+# $2 permission (optional)
+{
+ mkdir -p "$1"
+ checkReturnCode
+ if [ "$2" != "" ]
+ then
+ chmod $2 "$1"
+ checkReturnCode
+ fi
+}
+function copyFileToTmpDir
+# $1 from-file path
+# $2 to-file path
+# $3 permission
+{
+ cp "$1" "$2"
+ checkReturnCode
+ if [ "$3" != "" ]
+ then
+ chmod $3 "$2"
+ checkReturnCode
+ fi
+}
+
+# Setup
+cd "${TOP}"
+mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
+rm -rf ${NBTMPDIR}
+mkdir -p ${NBTMPDIR}
+
+# Copy files and create directories and links
+cd "${TOP}"
+makeDirectory "${NBTMPDIR}/areacalc"
+copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
+
+
+# Generate tar file
+cd "${TOP}"
+rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/areacalc.tar
+cd ${NBTMPDIR}
+tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/areacalc.tar *
+checkReturnCode
+
+# Cleanup
+cd "${TOP}"
+rm -rf ${NBTMPDIR}
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configurationDescriptor version="80">
+ <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
+ <df name="areacalc" root=".">
+ <df name="bin">
+ </df>
+ <df name="src">
+ </df>
+ <in>areacalc.cpp</in>
+ </df>
+ <logicalFolder name="ExternalFiles"
+ displayName="Important Files"
+ projectFiles="false"
+ kind="IMPORTANT_FILES_FOLDER">
+ <itemPath>src/Makefile</itemPath>
+ </logicalFolder>
+ </logicalFolder>
+ <sourceFolderFilter>^(nbproject)$</sourceFolderFilter>
+ <sourceRootList>
+ <Elem>.</Elem>
+ </sourceRootList>
+ <projectmakefile>src/Makefile</projectmakefile>
+ <confs>
+ <conf name="Default" type="0">
+ <toolsSet>
+ <remote-sources-mode>LOCAL_SOURCES</remote-sources-mode>
+ <compilerSet>default</compilerSet>
+ </toolsSet>
+ <makefileType>
+ <makeTool>
+ <buildCommandWorkingDir>src</buildCommandWorkingDir>
+ <buildCommand>${MAKE} -f Makefile</buildCommand>
+ <cleanCommand>${MAKE} -f Makefile clean</cleanCommand>
+ <executablePath></executablePath>
+ </makeTool>
+ </makefileType>
+ </conf>
+ </confs>
+</configurationDescriptor>
View
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.cnd.makeproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/make-project/1">
+ <name>areacalc</name>
+ <c-extensions/>
+ <cpp-extensions>cpp</cpp-extensions>
+ <header-extensions/>
+ <sourceEncoding>UTF-8</sourceEncoding>
+ <make-dep-projects/>
+ <sourceRootList>
+ <sourceRootElem>.</sourceRootElem>
+ </sourceRootList>
+ <confList>
+ <confElem>
+ <name>Default</name>
+ <type>0</type>
+ </confElem>
+ </confList>
+ </data>
+ </configuration>
+</project>
View
@@ -0,0 +1,2 @@
+all:
+ g++ main.cpp -o ../bin/areacalc
View
@@ -0,0 +1,8 @@
+/*
+ * File: areacalc.cpp
+ * Author: Phill Fernandes <pfernandes@techweekmedia.com>
+ *
+ * Created on May 11, 2012, 9:43 PM
+ */
+#include "header.h"
+#include "calculations.h"
View
@@ -0,0 +1,18 @@
+/*
+ * calculations.h
+ * dev-xcode
+ *
+ * Created by Phillip Fernandes on 11/11/10.
+ * Copyright 2010 TechWeek Media, Inc. All rights reserved.
+ *
+ *
+ * This file includes all the shape calculation header files.
+ *
+*/
+
+#include "square.h"
+#include "rectangle.h"
+#include "triangle.h"
+#include "paralellogram.h"
+#include "rhombus.h"
+#include "trapezoid.h"
View
@@ -0,0 +1,15 @@
+#!/bin/bash
+clear
+echo "Compiling main.cpp"
+g++ *.cpp -c
+echo " "
+echo "Linking Libraries"
+g++ *.o -ldl -lpthread -o a2manager
+echo " "
+echo "Cleaning Up"
+rm usefulFuncs.o vhostMgmt.o specialDeployments.o main.o startStop.o
+echo " "
+echo "DONE"
+echo " "
+sleep 3
+clear
View
@@ -0,0 +1,18 @@
+/*
+ * header.h
+ * dev-xcode
+ *
+ * Created by Phillip Fernandes on 11/19/10.
+ * Copyright 2010 TechWeek Media, Inc. All rights reserved.
+ *
+ */
+//#include "GfdOogleTech.h"
+#include<iostream>
+using namespace std
+
+int header()
+{
+ cout << "Area Calculator" << endl << endl;
+
+ return 0;
+}
View
@@ -0,0 +1,36 @@
+/*
+ * paralellogram.h
+ * dev-xcode
+ *
+ * Created by Phillip Fernandes on 11/11/10.
+ * Copyright 2010 TechWeek Media, Inc. All rights reserved.
+ *
+ */
+
+int paralellogram()
+{
+
+ system(clearcommand);
+ header();
+
+ double base;
+ double height;
+ double area;
+
+ cout << "Base: ";
+ getnum(base, ;);
+
+ cout << "Height: ";
+ getnum(height, ;);
+
+ area = base * height;
+
+ cout << "Work: " << base << " * " << height << " = " << area << endl;
+ cout << "Final " << area << endl;
+
+ system(sleepcommand);
+
+ system(clearcommand);
+
+ return 0;
+}
View
@@ -0,0 +1,36 @@
+/*
+ * rectangle.h
+ * dev-xcode
+ *
+ * Created by Phillip Fernandes on 11/11/10.
+ * Copyright 2010 TechWeek Media, Inc. All rights reserved.
+ *
+ */
+
+int rectangle()
+{
+
+ system(clearcommand);
+ header();
+
+ double base;
+ double height;
+ double area;
+
+ cout << "Base: ";
+ getnum(base, ;);
+
+ cout << "Height: ";
+ getnum(height, ;);
+
+ area = base * height;
+
+ cout << "Work: " << base << " * " << height << " = " << area << endl;
+ cout << "Final " << area << endl;
+
+ system(sleepcommand);
+
+ system(clearcommand);
+
+ return 0;
+}
View
@@ -0,0 +1,36 @@
+/*
+ * rhombus.h
+ * dev-xcode
+ *
+ * Created by Phillip Fernandes on 11/11/10.
+ * Copyright 2010 TechWeek Media, Inc. All rights reserved.
+ *
+ */
+
+int rhombus()
+{
+
+ system(clearcommand);
+ header();
+
+ double d1;
+ double d2;
+ double area;
+
+ cout << "Diagonal 1: ";
+ getnum(d1, ;);
+
+ cout << "Diagonal 1: ";
+ getnum(d2, ;);
+
+ area = d1 * d2;
+
+ cout << "Work: " << d1 << " * " << d2 << " = " << area << endl;
+ cout << "Final " << area << endl;
+
+ system(sleepcommand);
+
+ system(clearcommand);
+
+ return 0;
+}
View
@@ -0,0 +1,36 @@
+/*
+ * square.h
+ * dev-xcode
+ *
+ * Created by Phillip Fernandes on 11/11/10.
+ * Copyright 2010 TechWeek Media, Inc. All rights reserved.
+ *
+ */
+
+int square()
+ {
+
+ system(clearcommand);
+ header();
+
+ double base;
+ double height;
+ double area;
+
+ cout << "Base: ";
+ getnum(base, ;);
+
+ cout << "Height: ";
+ getnum(height, ;);
+
+ area = base * height;
+
+ cout << "Work: " << base << " * " << height << " = " << area << endl;
+ cout << "Final " << area << endl;
+
+ system(sleepcommand);
+
+ system(clearcommand);
+
+ return 0;
+ }
Oops, something went wrong.

0 comments on commit a2e4ad6

Please sign in to comment.