[Information Processing Technician Practical] Key Contents of the 3rd Session in 2021 (2)
※ If there is a source for each content, a link is provided within the related content.
? Obtain Java output
Operator ^ ➡ exclusive OR
public class testco {
public static void main(String[] args) {
int a = 3, b = 4, c = 3, d = 5;
if((a == 2 | a == c) & !(c > d) & (1 == b ^ c != d)) {
a = b + c;
if(7 == b ^ c != a) {
System.out.println(a);
} else {
System.out.println(b);
}
} else {
a = c + d;
if(7 == c ^ d != a) {
System.out.println(a);
} else {
System.out.println(d);
}
}
}
}
- Here the first if statement matches TRUE ( a==2 | a==c ) in a==c !( c>d ) & ( 1==b ^ c!=d ) in c
- Substitute the value of a as the sum of b+c as 7
- In the second if statement, c does not match a, so it is TRUE
- As a result System.out.println(a); ➡ Prints 7.
? Obtain C output value
**arr is a double pointer and points to the value *arr[0], so it becomes 12.
So *arr[1] + **arr + 1 = 37
? SQL
CROSS JOIN creates m*n rows. Here, there are 2 NAMEs starting with s% according to the RULE conditions of T2, and 2 NAMEs belonging to trk in the middle with %t%, making a total of 4.
? Python output
100 and 200 are inconsistent values. Therefore, it outputs False.
? UML 다이어그램
Use Case Diagram - Depicts the system's interactions with the outside world during the requirements analysis process.
Acitivy diagram - models the flow of work or expresses the life cycle of an object
Sequence diagram - Analyzing message passing between objects in time flow
Collaboration diagram - Creation centered on messages exchanged between objects
Class diagram - depicts the structural appearance of the system, represents the domain structure, describes concepts and abstract concepts within the domain, and includes properties and methods.
Component diagram – depicts the software structure
Deployment diagram - depicts the composition of the corporate environment and the relationships between components
? 객체지향 디자인패턴
Creation pattern
- Builder - A pattern that encapsulates the creation phase and uses the same construction process.
- Prototype - A pattern that allows you to create a new object by cloning an existing object.
- Factory Method - A pattern that defines an interface that creates an object in a parent class and then creates an instance in a child class.
- Abstract Factory - A pattern that brings together a set of products and lets you choose between factories.
- Singleton Singleton - a pattern that ensures only one instance.
structural pattern
- Adapter - A pattern that allows classes that cannot be used together due to interfaces to be used together.
- Bridge - A pattern that reduces the degree of coupling by separating abstraction and implementation
- Decorator Decorator - a pattern that extends functionality without changing the source.
- Facade - A pattern that provides loose coupling through a single interface.
- Flyweight - Pattern for sharing large numbers of small objects
- Proxy - A pattern in which a delegate handles the work for you.
- Composite - A pattern that allows both individual and composite objects to be used equally by clients.
Behavior pattern
- Interpreter - Pattern that uses language rule classes
- Template Method - A pattern that defines the structure of the algorithm skeleton.
- Chain of Responsibility - A pattern that creates a link between objects and passes them on internally.
- Command Command - A pattern that encapsulates the request itself and passes it as a parameter.
- Iterator - A pattern that iterates without showing the internal representation.
- Mediator - a pattern that encapsulates interactions between objects.
- Memento - A pattern that stores state values in advance and then restores them.
- Observer - A pattern that notifies and automatically updates dependents when state changes.
- State - A pattern that changes behavior depending on the internal state of an object.
- Strategy - A pattern that encapsulates various algorithms to enable algorithm replacement.
- Visitor - a pattern that newly defines operations in a separate class
? C output value
#include
struct jsu {
char nae[12];
int os, db, hab, hhab;
};
int main(){
struct jsu st[3] = {{"데이터1", 95, 88},
{"데이터2", 84, 91},
{"데이터3", 86, 75}};
struct jsu* p;
p = &st[0];
(p + 1)->hab = (p + 1)->os + (p + 2)->db;
(p + 1)->hhab = (p+1)->hab + p->os + p->db;
printf("%d\n", (p+1)->hab + (p+1)->hhab);
}
The problem is to find the output value of C.
Here, if you look at the printf() value in main, p indicates the address value of the st array, and the word p+1 indicates the address value of st[1].
(p + 1)->hab = (p + 1)->os + (p + 2)->db;
Therefore, if you look at the (p+1)->hab part first, it is the sum of the values of os in the address value of st[1] and db in the address value of st[2]. Therefore, 84+75= 159.
(p + 1)->hhab = (p+1)->hab + p->os + p->db;
In this part, (p+1)->hab value 159 and the address value of st[0] means the sum of the value held by db in the address value of os and st[0]. Therefore, 159+95+88= 342.
So the resulting output value is 159+342= 501.
? File Structure File Structure
The file structure is a way in which the records that make up the file are organized in auxiliary memory, and the method varies depending on the access method. Among the access methods, there is a way to record records by sorting them in key-value order and organizing them by constructing an index that collects only the key items of the records. When referencing a record, you can refer to it directly using the address pointed to by the index. The file structure includes sequential access, index access, and hashing access.
? GUI
It refers to an environment in which users exchange information with a computer through graphics.
? Software integration testing
It is divided into bottom-up and top-down.
Bottom-up refers to a method in which testing proceeds from lower modules to higher modules. A test driver must be used, and there is a test stub that acts as an interface to the lower module and upper module.
Comments
No comments yet. Be the first!
164 posts in 테크
- 2233D Gaussian Splatting vs Unreal Engine: Two Ways to Build a 3D World — and Where Each One Ships
- 222LLMs Inside Unreal Engine: The New Skills Game Developers Need in 2026
- 220Living With Claude Fable 5: How the Most Capable Model Changes the Way You Actually Work
- 219Luma's Bet: From Video Generator to a Single Model That Thinks in Pixels
- 215The Best AI Video Models in 2026: Types, Differences, and Where This Is All Going