@@ -0,0 +1,1345 @@
+package anabalica.github.io.meowletters.storage;%0A%0Aimport android.content.ContentValues;%0Aimport android.content.Context;%0Aimport android.database.sqlite.SQLiteDatabase;%0A%0A/**%0A * A DAO (Data Access Object) class to highscores database%0A *%0A * @author Ana Balica%0A */%0Apublic class HighscoresDataSource %7B%0A%0A    private SQLiteDatabase db;%0A    private HighscoresDbHelper dbHelper;%0A%0A    public HighscoresDataSource(Context context) %7B%0A        dbHelper = new HighscoresDbHelper(context);%0A    %7D%0A%0A    public void open() %7B%0A        db = dbHelper.getReadableDatabase();%0A    %7D%0A%0A    public void close() %7B%0A        dbHelper.close();%0A    %7D%0A%0A    /**%0A     * Insert a new highscore into highscores table%0A     *%0A     * @param username String user game nickname%0A     * @param score int amount of game points accumulated by the end%0A     * @return true if the highscore was inserted, false otherwise%0A     */%0A    public boolean createHighscore(String username, int score) %7B%0A        if (score %3E 0) %7B%0A            ContentValues values = new ContentValues();%0A            values.put(HighscoresContract.HighscoreEntry.COLUMN_NAME_USERNAME, username);%0A            values.put(HighscoresContract.HighscoreEntry.COLUMN_NAME_SCORE, score);%0A%0A            db.insert(HighscoresContract.HighscoreEntry.TABLE_NAME, null, values);%0A            return true;%0A        %7D%0A        return false;%0A    %7D%0A%7D%0A

create HighscoresDataSource class and method to create highscore