Commit 2147b59a authored by Caelan Reese Wong's avatar Caelan Reese Wong
Browse files

Created skeleton Molecule Class that reads a text file

parent 5ed72847
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
Hello World!
 No newline at end of file
actylene
4
C
C
H
H
0 1
0 1
0 1
0 2
1 3
 No newline at end of file
+0 −1
Original line number Diff line number Diff line
@@ -6,5 +6,4 @@ public class Main {
        Molecule tester = new Molecule(filename);
    }


}
+15 −5
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@ package edu.bu.ec504.project;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;

public class Molecule {

@@ -24,17 +23,28 @@ public class Molecule {
        }
    }

    public void saveData(String s){

    }


    // TODO: add molecule to the database


    //FIELDS

    /**
     * saves element as the key and the quantity as the value
     */
    String moleculeName;

    int numAtoms;

    int numEdges;

    // numDegrees for each atom;

    int[] numElements; //stores quantity of each element



    HashMap <Character ,Integer>map = new HashMap<>();

}