<commit_before>require_relative 'iFactory'
require_relative 'addFactory'
require_relative 'subFactory'
require_relative 'multFactory'
require_relative 'divFactory'
require_relative 'operation'
require_relative 'operationAdd'
require_relative 'operationSub'
require_relative 'operationMult'
require_relative 'operationDiv'

numberA = ARGV[0].to_f
operation = ARGV[1]
numberB = ARGV[2].to_f

def calculate(numberA, operatFactory, numberB)
  operation = operatFactory.createOperation
  operation.numberA = numberA
  operation.numberB = numberB
  result = operation.getResult
  puts "the result is: #{result}"
end

case operation
when '+'
  calculate(numberA, AddFactory.new, numberB)
when '-'
  calculate(numberA, SubFactory.new, numberB)
when '*'
  calculate(numberA, MultFactory.new, numberB)
when '/'
  calculate(numberA, DivFactory.new, numberB)
else
  puts "Please input the right operation sign.Such as '+', '-', '\\*', '/'!"
end

<commit_msg>update the factory warning in the run.rb file<commit_after>require_relative 'iFactory'
require_relative 'addFactory'
require_relative 'subFactory'
require_relative 'multFactory'
require_relative 'divFactory'
require_relative 'operation'
require_relative 'operationAdd'
require_relative 'operationSub'
require_relative 'operationMult'
require_relative 'operationDiv'

numberA = ARGV[0].to_f
operation = ARGV[1]
numberB = ARGV[2].to_f

def calculate(numberA, operatFactory, numberB)
  operation = operatFactory.createOperation
  operation.numberA = numberA
  operation.numberB = numberB
  result = operation.getResult
  puts "the result is: #{result}"
end

case operation
when '+'
  calculate(numberA, AddFactory.new, numberB)
when '-'
  calculate(numberA, SubFactory.new, numberB)
when '*'
  calculate(numberA, MultFactory.new, numberB)
when '/'
  calculate(numberA, DivFactory.new, numberB)
else
  puts "Please input the right operation sign.Such as '+', '-', '\\*', '\\'!"
end


{'fraction_non_alphanumeric': 0.11012987012987013, 'fraction_numerical': 0.003116883116883117, 'mean_word_length': 6.2406015037593985, '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': '6763463', 'n_tokens_mistral': 607, 'n_tokens_neox': 607, 'n_words': 151}