<commit_before>/**
 * The first part is a constructor that is used so that we can create
 * new objects from Computer. I pick this design pattern because it fits
 * very well with the decorator pattern
 */
function Computer ()
{
    this.cost = function () { return 1000; };
    this.screensize = function () { return 11; };
    this.harddrivesize = function() { return 128; };
    this.memsize = function () { return 8; };
}

//First Decoration

function screen ( computer )
{
    var a = computer.cost();
    computer.cost = function ()
    {
        return a + 200;
    };
}

//Second Decoration

function drive ( computer )
{
    var a = computer.cost();
    computer.cost = function ()
    {
        return a + 200;<commit_msg>Answer to #s 4 and 5, decorator pattern and other design patter(constructor)<commit_after>/**
 * The first part is a constructor that is used so that we can create
 * new objects from Computer. I pick this design pattern because it fits
 * very well with the decorator pattern
 */
function Computer ()
{
    this.cost = function () { return 1000; };
    this.screensize = function () { return 11; };
    this.hardsize = function() { return 128; };
    this.memsize = function () { return 8; };
}

//First Decoration

function screen ( computer )
{
    var a = computer.cost();
    computer.cost = function ()
    {
        return a + 200;
    };
}

//Second Decoration

function drive ( computer )
{
    var a = computer.cost();
    computer.cost = function ()
    {
        return a + 200;
{'fraction_non_alphanumeric': 0.11432325886990802, 'fraction_numerical': 0.022339027595269383, 'mean_word_length': 2.7146341463414636, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3379665', 'n_tokens_mistral': 465, 'n_tokens_neox': 428, 'n_words': 164}