Tag: 固体原理

如何设计一个保持SOLID原则和设计模式的应用程序

在启动时说ruby中的应用程序有两种模式:命令行模式和文件模式 给定参数ruby myprogram input.txt output.txt时 ,它会根据输入文件中的某些命令生成输出。 当没有提供任何参数时,它会向我们提供命令提示符。 使用以下命令。 create_class_with_capacity 40 create_student_with_marks Alex 70 create_student_with_marks Mathew 30 create_student_with_marks John 55 .. create_student_with_marks Sylvia 70 etc… fail_student_roll_no 12 => Student with roll number 12 #{student} failed give_marks_to_roll_no 70 1 =>Student with roll number 1 Alex got 70 marks find_all_students_with_marks 70 => Alex, Peter , Russell , Mark […]