Skip to content

Commit 31af446

Browse files
Update README.md
1 parent 99aedc1 commit 31af446

File tree

1 file changed

+72
-95
lines changed

1 file changed

+72
-95
lines changed

README.md

Lines changed: 72 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,76 @@
11
<sub>**This work is being done as part of the Course Deisgn patterns on <strong>Ruby</strong> **</sub>
22
# Design-patterns
3+
<h4>Map</h4>
34
<p>
4-
<a href="https://github.com/StrongerProgrammer7/Design-patterns#-introduction-with-ruby---1lab">Introduction with Ruby</a></br>
5-
<h5>Kernel classes and models</h5>
6-
&emsp;&emsp;<a href="https://github.com/StrongerProgrammer7/Design-patterns#1ex-object-and-clesses">Object and clesses<a/>
7-
&emsp;&emsp;<a href="https://github.com/StrongerProgrammer7/Design-patterns#2ex-reading-view-record-entity">Reading, view, record entity<a/>
8-
9-
</p>
10-
<div>
11-
<h3> Introduction with Ruby - 1lab</h3>
12-
<p>1 Task: <br/><pre>
13-
1.&emsp;Hello world
14-
2.&emsp;Accept the username as a program argument.Say hello to the user using string formatting.
15-
&emsp;&emsp;&emsp;Ask what language is the user's favorite, in case it is ruby, answer that the user is
16-
&emsp;&emsp;&emsp;&emsp;a sucker, otherwise be sure to answer that soon it will be ruby and put
17-
&emsp;&emsp;&emsp;&emsp;&emsp;different comments for several languages.
18-
3.&emsp;Ask user enter ruby language command and OS command. Execute ruby and OS command</pre>
19-
</p>
20-
<p> 2 Task:<br/><pre>
21-
1.&emsp;Find the sum of prime divisors of a number.
22-
2.&emsp;Find the number of odd digits of a number greater than 3
23-
3.&emsp;Find the multiple of such divisors of a number, the sum of the digits less than
24-
&emsp; &emsp;the sum of the digits of the original number.
25-
</pre></p>
26-
<p> 3 Task:<br/><pre>
27-
1.&emsp;Write methods that find the minimum, elements, number of the first positive element.
28-
&emsp; &emsp; Each operation in a separate method. Solve the problem using loops (for and while)
29-
2.&emsp;Write a program that takes two values as an argument. The first
30-
&emsp; &emsp;value tells which of the methods of task 1 to execute, the second one
31-
&emsp; &emsp; &emsp;tells where to read the list from where the file address should be written
32-
&emsp; &emsp; &emsp; &emsp;as an argument. Next, you need to read the array and execute the method.
33-
</pre></p>
34-
<p> 4 Task:<br/><pre>
35-
1.&emsp;Given an integer array. It is necessary to find the number of emails located after
36-
&emsp;the last max
37-
2.&emsp;Given an integer array. It is necessary to place the elements, located
38-
&emsp; &emsp;before the min, at the end of the array
39-
3.&emsp;An integer array and an interval (a,b) are given. Need to find the max of the elements
40-
&emsp; &emsp;in this interval
41-
4.&emsp;Given an integer array. Output indexes of el-in, which are less than its left
42-
&emsp; &emsp;neighbor, and the number of such numbers
43-
5.&emsp;For the given list + numbers, construct a list of all + prime divisors
44-
&emsp; &emsp;of the e-list without repetitions
45-
</pre></p>
46-
</div>
47-
<h3> Kernel classes and models - 2lab</h3>
48-
<div>
49-
<p><h4>1Ex Object and clesses:</h4> <br/><pre>
50-
1.&emsp;Create the Student class in a separate file with the object fields ID, Last Name,
51-
&emsp;First Name, Middle Name, Phone, Telegram, Mail, Git. Full name is required, others are not.
52-
&emsp;&emsp;Write a constructor, write a getter and a setter for each field,
53-
&emsp;&emsp;&emsp;when naming methods it is MANDATORY to use ruby naming conventions.
54-
2.&emsp;Create several objects from a separate main.rb file and display information about them
55-
&emsp;on the screen. Think over the correct way to display information about the current state of
56-
&emsp;&emsp;the object on the screen, modify the class.
57-
3.&emsp;Avoid code duplication in constructor, getter and setter.
58-
4.&emsp;Use attributes to concisely write getters and setters.
59-
5.&emsp;Provide in the constructor the ability to create objects with any combination of
60-
&emsp;&emsp;filling in optional fields.
61-
6.&emsp;Add a CLASS method that checks if some string is a phone number. Modify the class
62-
&emsp;so that at an arbitrary point in time there could not be an object with an invalid
63-
&emsp;&emsp;string in the phone number field, for this you will have to modify the constructors.
64-
&emsp;&emsp;&emsp;Test the resulting class.
65-
7.&emsp;Create validations for the correct form of the string in the remaining fields.
66-
8.&emsp;Write a validate method that performs two validations of the presence of the
67-
&emsp;&emsp;git and the presence of any contact for communication, if possible separate the methods.
68-
9.Write a set_contacts method that sets the value of a field or fields for the entered contacts.
69-
10.&emsp;Start building a class diagram by describing this class.</pre>
5+
<a href="">Introduction with Ruby</a></br>
6+
<a href="">Kernel classes and models</a> <i> Pattern Strategy</i></br>
7+
<a href="">Single Entity Model</a> <i> Pattern: Singleton && Adapter && MVC && Observer</i></br>
8+
<a href="">Introduction with Ruby</a></br>
9+
<a href="">Introduction with Ruby</a></br>
10+
<a href="">Introduction with Ruby</a></br>
11+
<a href="">Introduction with Ruby</a></br>
7012
</p>
71-
<p><h4>2Ex Reading, view, record entity:</h4> <br/><pre>
72-
1. Think about the structure of String representation of the class object,coordinate it
73-
&emsp;with clause 2. Write a separate constructor accepting a string as an input,
74-
&emsp;&emsp;which parses this parses the string and calls the standard constructor with
75-
&emsp;&emsp;&emsp;arses this string and calls the standard constructor with the parameters.
76-
&emsp;&emsp;&emsp;&emsp;Test the constructor from the main class.
77-
2. Design an exception structure for the given constructor
78-
&emsp;constructor in case parsing of the string is impossible and in case the data in the
79-
&emsp;&emsp;string didn't pass validation. if the data in the string is not validated. 3.
80-
3. Write a getInfo method that returns brief
81-
&emsp;information about the student - Surname and Initials; git, communication
82-
&emsp;&emsp;(specify any means of communication and state what it is) on ONE line. If possible,
83-
&emsp;&emsp;&emsp;divide the method into components (in the future this information will be displayed in
84-
&emsp;&emsp;&emsp;&emsp;table and you will have to take it in parts).
85-
4. Write Student_short class that has 4 ID fields,
86-
&emsp;Surname and initials, Git, Contact. The fields can't be edit. There are two possible
87-
&emsp;&emsp;constructors - one of them is an object of class Student.Student class object, the other
88-
&emsp;&emsp;&emsp;has an ID and a string that contains and a string that contains all other information.
89-
5. Refactoring by separating the superclass and removing code duplication in the Student
90-
&emsp;and Student_short classes.
91-
6. Mark the changes in the class diagram.
92-
7. Write a read_from_txt method that receives file address arguments, throws an exception with
93-
&emsp;notification if the address is invalid, and returns an array of Student type objects.
94-
8. Test the method by outputting a brief output of information about each object.
95-
9. Write a write_to_txt method that receives as address, name of a file, and a list of objects
96-
&emsp;of type Student.
97-
10. Test the compatibility of these methods.
98-
</pre></p>
99-
</div>
13+
14+
<h3> Content: </h3>
15+
[<i>Introduction with Ruby</i>](https://github.com/StrongerProgrammer7/Design-patterns/files/11524651/1_._2022-2023.pdf)
16+
<ul>
17+
<li>Introduction to Ruby</li>
18+
<li>Algorithms for working with numbers and loops</li>
19+
<li>Arrays</li>
20+
<li>Methods that take a block as an argument</li>
21+
</ul>
22+
[<i>Kernel classes and models</i>](https://github.com/StrongerProgrammer7/Design-patterns/files/11524661/2_._2022-2023.pdf)
23+
<h4>Using pattern Strategy</h4>
24+
<ul>
25+
<li>Objects and classes</li>
26+
<li>Reading, Viewing, and Writing Entities</li>
27+
<li>Model classes.</li>
28+
<li>Classes: JSON,YAML,TXT <strong>(pattern Strategy)</strong></li>
29+
</ul>
30+
[<i>Single Entity Model</i>](https://github.com/StrongerProgrammer7/Design-patterns/files/11524667/3_._2022-2023.pdf)
31+
<h4>Using pattern Singleton && Adapter && MVC && Observer</h4>
32+
<ul>
33+
<li>Connecting a database to a model (pattern Singleton)</li>
34+
<li>Serialization (pattern Adapter) </li>
35+
<li>Building a window.(pattern MVC)</li>
36+
<li>MVC – CRUD - read. (pattern Observer - View)</li>
37+
</ul>
38+
<ul>
39+
<li></li>
40+
<li></li>
41+
<li></li>
42+
<li></li>
43+
</ul>
44+
<ul>
45+
<li></li>
46+
<li></li>
47+
<li></li>
48+
<li></li>
49+
</ul>
50+
<ul>
51+
<li></li>
52+
<li></li>
53+
<li></li>
54+
<li></li>
55+
</ul>
56+
<ul>
57+
<li></li>
58+
<li></li>
59+
<li></li>
60+
<li></li>
61+
</ul>
62+
<ul>
63+
<li></li>
64+
<li></li>
65+
<li></li>
66+
<li></li>
67+
</ul>
68+
<ul>
69+
<li></li>
70+
<li></li>
71+
<li></li>
72+
<li></li>
73+
</ul>
74+
75+
76+

0 commit comments

Comments
 (0)