ix CHAPTER 1: Explain the characteristics of procedural, object-oriented and event-driven programming, conduct an analysis of a suitable Integrated Development Environment IDE.... This r
cecee
I would like to express my heartfelt gratitude to my teacher, Nguyen Hoang Anh Vu, for his unwavering support in my academic journey His patience, motivation, enthusiasm, and extensive knowledge have been invaluable during my research and thesis writing Without his exceptional guidance, I would not have reached this achievement.
I would like to express my gratitude to my friends who have significantly contributed to my subject knowledge and provided unwavering support Additionally, I am thankful to the school for offering the necessary resources and facilities that have enabled me to excel in my work.
I want to express my heartfelt gratitude to my family, especially my parents, who have been my unwavering support system from the very beginning Their constant encouragement and care have motivated me to strive for success.
PERFOMED STUDENT: PHAN QUANG HOP
I affirm that this work is my original creation, derived from my research, and I have properly acknowledged all materials and sources used, including books, articles, reports, lecture notes, and other documents or communications I also confirm that I have not submitted this assignment for evaluation in any other course without explicit permission from the relevant unit coordinators, nor have I plagiarized or appropriated ideas from others in any manner.
I verify that the work I've submitted for this assignment is all my own, and that all research sources have been properly credited
Signature of the student: Date:
LIST OF TABLES AND FIGURES 0000 sence cee vil
CHAPTER 1: Explain the characteristics of procedural, object-oriented and event-driven programming, conduct an analysis of a suitable Integrated Development Environment (IDE) 1
1 The defủnition oŸ programming mOC€èS - - sư n 1 Evenf-driven DrOứTainming - ng nh nh HH HH HH 3
1.1 Characteristics of the programming modeÌs eee + ss se rrrrrrrrrrrs 7
CHAPTER 2 Implement basic algorithms in code using an [DE(P3) 2s 14
2.1 Write a program that implements an algorithm using an [DE - 14
CHAPTER 3 Define the debugging process and explain the importance of standardization
CHAPTER 4 integrates many programs like code completion, compiler editor outlining the coding standard you used in your code ( P5) oo ee eeeceseecseeneeneenecenesnessesneceaesaeeaesaaeaesseeneesneeneeneeneess 24
CHAPTER 4 M2 Analyze the common features that a developer has access to in an IDE 28
PERFOMED STUDENT: PHAN QUANG HOP
LIST OF TABLES AND FIGURES
Figure 2 procedural Drogramming - - + + 1H HH HH HH ch 2
Figure 3 fow charf aV€TAĐ€ HH nhàng HH HH HH HH HH HH 3
Figure 4 Event Driven Programming - s + + sxnv ng gnnnHn Hn Hhn ng H ngư nriờy 4
Figure 5 event is login to the W€SI(€ nhàng HH HH Hà HH HH it 4
Figure 7 inheritance calculafion €XaIIDÍC - - + x1 ng HH cưng 7
Figure 8 procedure-oriented charaCf€TISfICS - - óc HH HH HH nh nh 8
Figure 9 object-oriented programming charaCf€TISfICS nhi, 10
Figure 10 event-driven programming characteristics ccc ceesesseenceeeecneeneesneeneeneeneesneenees 11 F00000) dđ.(.(|:Ở|3Õ3ỐEÔÔỎ 13
Figure 14 computer €SIỉT HH HH HH HH HH ng kết 16
Figure 15 CompUf€T COdC HH Hành TH HH HH HH HH HH HH 17
Figure 16 code to run the DFOTAIH - vn ng HH HH Hiệp 17
Figure 17 run the program with addifIOI sàn HH HH HH ngư 18
Figure 18 we run the program With addition eee eseeeeseeseeeeeseecneeneeneeneeenesneeneeaeeaee 18
The article discusses various error messages and solutions related to specific figures in a technical document Figure 19 illustrates a cell error, while Figure 22 highlights the T€SUẽfS error Figure 23 presents a description of the error named CÍICK Í, and Figure 24 demonstrates the process of fixing the error, leading to successful results Each figure is associated with specific error codes and resolutions, emphasizing the importance of troubleshooting in technical environments.
To find the largest number among three values, refer to Figure 26 For determining the largest number between two values, see Figure 27 It's important to use standard function naming conventions as illustrated in Figure 28 Figure 29 discusses the significance of using meaningful variable names Figure 30 presents examples of efficient coding practices For debugging examples, consult Figure 32 Figure 33 emphasizes the importance of code completion Finally, Figure 34 outlines the process for running the DFOBTAIH.
PERFOMED STUDENT: PHAN QUANG HOP
Programming is essential in today's world, and this article explores the key characteristics of procedural, object-oriented, and event-driven programming We will analyze suitable Integrated Development Environments (IDEs) and gain a deeper understanding of algorithms, including their definitions and significance Join us as we delve into these important concepts in programming!
This report includes the following contents:
CHAPTERI: Explain the characteristics of procedural, object-oriented, and event-driven programming, conduct an analysis of the appropriate Integrated Development Environment (IDE)
CHAPTERz2: Give an explanation of what are procedural, object-oriented, and event-driven models; their characteristics and the relationship between them (P2)
CHAPTER3: Write a program to execute the algorithm using the IDE (P3)
CHAPTER4: Explain the debugging process and explain the debugging facilities available in the IDE (P4)
CHAPTERS: Integrating multiple programs such as code completion, compilers, editors Outline the coding standards you already use in your code (P5)
CHAPTER6 Analyze common features that developers have access to in the IDE (M2)
CHAPTER 1: Explain the characteristics of procedural, object-oriented and event-driven programming, conduct an analysis of a suitable Integrated Development Environment (IDE)
1 The definition of programming models
Procedural programming and give examples
Procedural programming focuses on the execution of procedures, breaking down class programs into cohesive sections that utilize general data A program consists of both structure and algorithms, with components organized into subroutines that integrate to form an application These subroutines operate independently and exchange data through parameters and global variables When designing a program, a top-down programming approach is recommended, allowing for system-wide data sharing Functions within the program facilitate the seamless flow of data, enabling transformations from one form to another.
PERFOMED STUDENT: PHAN QUANG HOP
0 references static void Main(string[] args) { int math,| physics, chemistry;
Console.WriteLine("nhap math"); string st = Console.ReadLine(); math = int.Parse(st);
Console.WriteLine("nhap physics"); st = Console.ReadLine(); physics = int.Parse(st);
Console.WriteLine("nhap chemistry"); st = Console.ReadLine(); chemistry = int.Parse(st); int average = ((math + physics + chemistry) / 3); Console.WriteLine("average" + average);
‘BTEC hes cọc nhap math, physics, chemistry average
Event-driven programming is a paradigm where business logic is executed based on events, such as keyboard presses or mouse hovers This approach builds upon object-oriented programming, enhancing it to effectively handle event capture issues like mouse clicks It is particularly prevalent in the development of graphical user interfaces (GUIs).
PERFOMED STUDENT: PHAN QUANG HOP
Figure 4 Event Driven Programming for example
Figure 5 event is login to the website
Object Oriented Programming is a programming method based on the concept of classes and objects OOP focuses on manipulating objects rather than the logic for manipulating them
OOP is the foundation of today's design patterns
The goal of OOP is to optimize source code management, increase reusability, and most importantly, help encapsulate procedures with known properties through the use of objects
Objects in OOP consist of 2 main components: ¢ Attributes: are the information and characteristics of the object ¢ Methods: are the behaviors that the object can perform
A smartphone serves as a practical example, showcasing key properties such as color, memory, and operating system, alongside essential methods including calling, taking pictures, texting, and recording.
Class is an abstraction of the object Objects with similar properties are grouped into a class The class will also include two pieces of information: properties and methods
An object will be treated as an instance of the class
Continuing the example in the object section above, we have a smartphone class consisting of 2 components: ¢ Properties: color, memory, operating system
* Methods: calling, taking pictures, texting, recording
Objects of this class can be: iPhone, Samsung, Oppo, Huawei
PERFOMED STUDENT: PHAN QUANG HOP
Explain the characteristics of procedural, object-oriented and event-driven programming, conduct an analysis of a suitable Integrated Development Environment (IDE)
Characteristics of the programming modeÌs eee + ss se rrrrrrrrrrrs 7
set up procedures advantage : breaking a large program into subroutines makes programming easier to recognize and manage programs better defect : does not strongly support code reuse
The system is not ideal for handling large quilts due to its multiple access functions It relies on common data, which complicates the control of information as it transitions between functions, making it challenging to maintain focus on the tasks at hand (algorithm).
Large programs are broken down into small functions, but if the information is not consistent, there are big consequences
PERFOMED STUDENT: PHAN QUANG HOP
Encapsulation is a fundamental concept in object-oriented programming that enables the concealment of an object's internal data and processing mechanisms By restricting direct access to the object's data, other objects must interact with it solely through publicly available methods, ensuring the integrity and security of the object's state.
This property helps to increase the security of the object and avoid unintentional data corruption
Inheritance is a widely used feature in programming that enables the creation of a new class, known as the Child class, which inherits and reuses properties and methods from an existing class, referred to as the Parent class.
Child classes inherit all the members of the Parent class and do not need to be redefined Subclasses can extend inherited components or add new ones
For example: ¢ The parent class is a smartphone, with attributes: color, memory, operating system, etc
* Subclasses iPhone, Samsung, Oppo also have attributes: color, memory, operating system
Polymorphism in OOP programming allows different objects to perform the same function in different ways
For example: ¢ In the smartphone class, each model inherits the components of the parent class, but iPhone runs on iOS operating system, and Samsung runs on Android operating system
PERFOMED STUDENT: PHAN QUANG HOP
* Dogs and cats both listen to the owner's "call away" command Dogs will "woof" and cats will "meow"
Abstraction eliminates the unnecessary complexity of the object and focuses only on what is essential and important
For example, employee management is only interested in information such as: s Full name ¢ Date of birth ¢ Gender
Without the need to manage additional information about: ¢ Height ¢ Weight ® Interests e Skin color
Figure 9 object-oriented programming characteristics
PERFOMED STUDENT: PHAN QUANG HOP
Can handle many tasks source handling based on events
Event-oriented programming is an evolution of object-oriented programming, utilizing objects like text boxes, buttons, and labels This approach enhances user interaction by addressing event capture scenarios, including actions like clicks, hovers, and presses.
Private Su b btnLogin_Click Relevant login code goes here And the Event handler executes it
Event loop €—— Trigger Event handler
Figure 10 event-driven programming characteristics
PERFOMED STUDENT: PHAN QUANG HOP
The relationship between Procedural, Object-oriented, and Event-driven programming paradigms highlights their unique advantages and features Object-oriented programming (OOP) emphasizes encapsulation, inheritance, and polymorphism, promoting code reusability and scalability In contrast, event-driven programming (EDP) focuses on responding to user interactions and events, making it ideal for developing interactive applications Common examples of OOP include languages like Java and C++, while EDP is often used in environments such as JavaScript and Node.js For further research on these programming paradigms, the Association for Computing Machinery (ACM) Digital Library serves as a valuable resource, with access instructions available in the Course Guide.
Write a three to five (3-5) page paper in which you:
Identify at least two (2) advantages to using OOP as compared to using only PP
In this example, we define a class called "Car" that represents a vehicle The class has an attribute called "color," which stores the car's color, and a method named "drive," which simulates the action of driving the car The relationship between the class, its attribute, and its method is that the "Car" class encapsulates the properties of a vehicle through its attributes, while the "drive" method utilizes these properties to perform an action, demonstrating how the class and its components interact to model real-world behavior.
Visual Logic lacks the ability to support inheritance, a key feature of object-oriented programming that allows for the creation of new classes based on existing ones In contrast, event-driven programming offers the significant advantage of responsiveness, enabling applications to react to user inputs and events in real-time, unlike purely procedural programming, which follows a linear execution flow.
Use at least three (3) quality resources in this assignment Note: Wikipedia and similar Websites do not qualify as quality resources
Your assignment must follow these formatting requirements:
The document should be formatted in Times New Roman, size 12, with double spacing and one-inch margins on all sides Ensure that citations and references adhere to APA style or the specific format required by your school It's advisable to confirm any additional guidelines with your professor.
The assignment must begin with a cover page that includes the title, the student's name, the professor's name, the course title, and the date It is important to note that the cover page and the reference page do not count towards the total required length of the assignment.
The specific course learning outcomes associated with this assignment are:
Explain and identify object-oriented concepts
Identify object-oriented classes and also the attributes and methods they contain
Explain the use and benefits of object-oriented programming and event-driven programming
PERFOMED STUDENT: PHAN QUANG HOP
Use technology and information resources to research issues in computer programming design
Write clearly and concisely about computer programming design topics using proper writing mechanics and technical style convention
Click here to view the grading rubric for this assignment
Programming Languages—Procedural, Event Driven, and Object Oriented
* Program specifies exact sequence of all operations
* Event-Driven Programming(VB 6.0 and previous)
* Contain some elements of object-oriented programming, but not all
* Object-Oriented Programming (OOP) (VB NET)
13 PERFOMED STUDENT: PHAN QUANG HOP
Implement basic algorithms in code using an [DE(P3) 2s 14
Write a program that implements an algorithm using an [DE
write a program that input is a simple calculator that calculates calculations such as addition, subtraction, multiplication, and division
I set the input to enter the numbers A and B
I designed the calculations as follows:
I designed the button to be the exit button
This article discusses the implementation of a delete button in a simple calculator application When the delete button is clicked, it refreshes the interface and clears the input fields for numbers A and B The calculator performs basic arithmetic operations: addition (a + b) for the sum of two numbers, subtraction (a - b) for the difference, multiplication (a * b) for the product, and division (a / b) for the quotient The design of this straightforward calculator is also presented.
PERFOMED STUDENT: PHAN QUANG HOP
Console App (.NET Framework) pea
Figure 12 Create a new project Step 2 : Create a new class
4 Visual C# Items oy : Visual Cẽ Iteme Type: Visual C# ltems betel ss ° A blank Windows Forms (WinForms) Form
Data Ty Class for U-SQL Visual C# Items
WPF Form (Windows Forms) Visual C# Items
SQL Server User Control (Windows Forms) fisual C# Items
Storm Items coo Component Class Visual C# Items
About Bc 910013 Visual C# Items ADO.NET Entity Data el Visual C# Items
Application Configuration File Mitr RO aC
PERFOMED STUDENT: PHAN QUANG HOP
Figure 14 computer design Here is the code of a simple calculator
1 reference private void button5_Click(object sender, EventArgs e) int a = int.Parse(txt_soa.Text); int b = int.Parse(txt_sob Text); int tong = a + b; txt_ketqua.Text = tong.ToString();
1 reference private void txt_tru_Click(object sender, EventArgs e)
{ int a = int.Parse(txt_soa.Text); int b = int.Parse(txt_sob.Text); int tru = a - b; txt_ketqua.Text = tru.ToString();
1 reference private void txt_nhan_Click(object sender, EventArgs e) double a = double.Parse(txt_soa Text); double b = double.Parse(txt_sob Text); double nhan = a * b;
‘BTEC —-88— txt_ketqua.Text = nhan.ToString();
1 reference private void txt_chia_Click(object sender, EventArgs e) double a = double.Parse(txt_soa Text); double b = double.Parse(txt_sob Text); if (b < 9)
Console.WriteLine("enter the wrong number"); else
Console.WriteLine("enter the wrong number"); else
To reset the input fields in the application, the event handler for the delete button sets the results and all text boxes, including txt_ketqua, txt_soa, txt_sob, txt_cong, txt_chia, txt_nhan, and txt_tru, to empty strings.
Figure 15 computer code Einamespace chuongtinhcong
{ a static void Main(string[] args)
Figure 16 code to run the program
PERFOMED STUDENT: PHAN QUANG HOP
Step 4: run the program a2 chuongtrinh _ n x
Figure 17 run the program with addition a chuongtrinh — oO x
Figure 18 we run the program with addition
PERFOMED STUDENT: PHAN QUANG HOP
CHAPTER 3 Define the debugging process and explain the importance of standardization (P4)
3.1 explain the debugging process and explain the debugging facilities available in the IDE
Debugging is the process of identifying and fixing bugs (defects or issues that inhibit the proper operation of computer programs, software, or systems) in computer programming and software development
Step 2 find the cause of the error, syntax error, declaration error, al gorithm error Step 3 error handling
Step 4 run test and check
20 PERFOMED STUDENT: PHAN QUANG HOP
30 B private void search_CLick(object sender, EventArgs e)
34 35 | int a = int.Parse(txt_number1 Text)
36 int b = int.Parse(txt_number2 Text);
39 else d9 txt_ketqua.Text = b.ToString();
45 d6 |] int a = int.Pars(txt_number1.Text); t7 int b = int.Parse(txt_number2 Text); d8 int c = int.Parse(txt_number3.Text);
53 txt_ketqua.Text = b.ToString(); else
58 a private void button2_Click(object sender, EventArgs e)
67 B private void RDB2_CheckedChanged(object sender, EventArgs e)
™m™ E private void RBD3_CheckedChanged(object sender, EventArgs e)
PERFOMED STUDENT: PHAN QUANG HOP
74 el mielvaess void RBD3_CheckedChanged(object sender, EventArgs e)
™ Code — Description Project Fille Line Suppression State
@ csi002 ; expected max uotput.cs 35 Active
@ 51002 Syntax error, '( expected max uotput.cs 7 Active
@ 51002 ; expected max uotput.cs 61 Active © CS0117 ‘int’ does not contain a definition for ‘Pars max uetput.cs 46 Active
@ C50103 The name ‘fele’ does not exist in the current context max uotput.cs TÔ Acbve
€@ C0103 The name ‘tre’ does not evist in the current context max uotput.cs TT Active
Line 35 syntax error line 46 undefined variables
Line 77 formatting error ba To prevent possible data loss before loading the designer, the following errors must be resolved:
The designer encountered an error with the unknown name 'textBox4_TextChanged' at line 177 The method 'InitializeComponent' is auto-generated by the designer and should remain unaltered To resolve the issue, please revert any modifications and attempt to open the designer once more.
1 timsolonnhat uotput.Designer.cs Line:177 Column:1 Show Call Stack
Could not find an associated help topic for this error Check Windows Forms Design-Time error list
Forum posts about this error
Search the MSDN Forums for posts related to this error
Figure 22 cell error showing results
PERFOMED STUDENT: PHAN QUANG HOP
Ignore and Continue x) The designer cannot process unknown name ‘label1_Click’ at line 84 The code within the method it’ is generated 3 ae ^ za
"InitializeComponeni by the designer and should not be manually modified Please remove any changes and try opening the designer again
1 timsolonnhat uotput.Designer.cs Line:84 Column:1 Show Call Stack
Could not find an associated help topic for this error Ch indows Form: ign-Time error li
Forum posts about this error
Search the MSDN Forums for posts related to this error
Figure 24 After fixing the error, run normally
23 PERFOMED STUDENT: PHAN QUANG HOP
CHAPTER 4 integrates many programs like code completion, compiler editor outlining the coding standard you used in your code
I write a program that uses programming standards such as variable naming, standard function naming, and object naming, et cetera
+ In Winfom, there are a few different methods to name objects:
(OBJECT NAME SET NAME FOR OBJECT EXAMPLE
Link Label lIbl llblF acebook
Figure 9 standard versions of encryption Avoid giving your variables numerical names
The name of this function is:
- When describing its function must be concise
Capitalize the first two letters
- Each subcommand within a block must be indented, making it easier to understand the source code
24 PERFOMED STUDENT: PHAN QUANG HOP
- The straight column must be made of an open brace and a closed brace
Avoid using confusing code wherever you can and keep the length of the functions to a minimum
We will create a program to find the largest number between 2 numbers, and the largest number between 3 numbers
PERFOMED STUDENT: PHAN QUANG HOP
Figure 26 find the largest number among three numbers
Figure 27 find the largest number between 2 numbers synthesizes coding programs and compilers and applies many programming standards for example :
26 PERFOMED STUDENT: PHAN QUANG HOP š SBTEC
‘BTEC on mn txt number3 ŠSystem.Windows.Forr x
GenerateMemb: True Locked False Modifiers Private
H Focus Hee re=reMơslialơei—i Toren
Figure 28 use standard function naming for example :
RBD3 System.Windows.Forms.Radio x ee] DI
Text The text associated with the control
PERFOMED STUDENT: PHAN QUANG HOP
CHAPTER 4 M2 Analyze the common features that a developer has access to in an IDE
An Integrated Development Environment (IDE) is a comprehensive platform designed for coding and application development, incorporating essential tools such as compilers, interpreters, debuggers, and code formatting features It enhances the coding experience by providing functionalities like error checking, code organization, and search capabilities, making it an invaluable resource for developers.
An Integrated Development Environment (IDE) simplifies and enhances the application development process, although it's not a necessity for writing source code To execute the source code in any programming language, you only require the appropriate compiler for that language.
Analysis of the common characteristics of the IDE:
A word processing program is a type of software designed to edit electronic documents with some main functions as follows:
Display text content on screen
Allows users to modify and supplement at any position in the document
Display many different font styles (fonts), font sizes, colors
Images can be included in the text
28 PERFOMED STUDENT: PHAN QUANG HOP ° ‘BTEC we
There are various word processing programs available, with Microsoft Word being the most well-known commercial software, included in the Microsoft Office suite.
Console.WriteLine(" a "); string st = Console.ReadLine(); a = int.Parse(st);
Console.WriteLine(" b "); st = Console.ReadLine(); b = int.Parse(st);
Console.WriteLine("\n first degree equation {0}x +{1} =O ,", a,b); if (a == 6)
{ if (b == 9) { Console.WriteLine("\n The equation has infinitely many solutions."); else { x = (doubte)-b / a;
Console.WriteLine("\n valid equation x = {0}", Math.Round(x, 2)); }
Figure 31 text editor example Debugger, Compiler:
PERFOMED STUDENT: PHAN QUANG HOP
36 |] Console.WriteLine("\n The equation has infinitely many solutions.");
37 ] Console.WriteLine("\n valid equation x = {0}", Mat.Round(x, 2));
39 } q6 Í] Console.Read() mesue — -I(Ð2mmsljAshengjl@eMems= T]
™ Code Description Project File Line Suppression State
@ cs1026 ) expected phuongtinhbacnhat Program.cs 25 Active
€ CS1002 ; expected phuengtinhbacnhet Program.cs 43 AcEve
€9 C50103 The neme ‘Mat’ does not exist in the current context phuongtinhbacnhat Program.cs 37 Active
Figure 32 debug example, compiler Visual studio helps us detect the error on line 26 which is a structural error
Line 43 is missing the sign
- Complete the code and proceed to run the program
11 E static void Main(string[] args)
24 Console.WriteLine("\n first degree equation {0}x +{1} =O ,", a,b);
PERFOMED STUDENT: PHAN QUANG HOP
30 Console.WriteLine(" The equation has infinitely many solutions.");
37 Console.WriteLine(" valid equation x = {6}", Math.Round(x, 2));
# ˆ D:\code\phuongtinhbacnhat\phuongtinhbacnhat\bin\Debug\phuongtinhbacnhat.exe
Microsoft Visual Studio 2022 Supported Languages
Visual Studio, developed and owned by Microsoft, is a powerful website programming support tool Originally codenamed Project Boston in 1997, this comprehensive development solution combines various programming tools into one cohesive package.
The system that integrates a code editor, designer, and debugger for application development is called Visual Studio In other words, using just one Visual Studio program,
PERFOMED STUDENT: PHAN QUANG HOP
With BTEC, you can efficiently develop code, troubleshoot bugs, and enhance application design Users can also design user interfaces and experiences in Visual Studio, similar to the process of creating Xamarin, Blend, or UWP applications using XAML.
PERFOMED STUDENT: PHAN QUANG HOP
After completing my assignment, I gained a solid understanding of programming and learned how to write algorithms for various problems I successfully absorbed approximately 85% of the lesson content provided by my teacher To create my final report, I conducted thorough research using resources from teachers, friends, and online materials I self-assessed my work and determined that about 90% of the content was accurate, ultimately earning an M grade for this assignment.
33 PERFOMED STUDENT: PHAN QUANG HOP
After finishing this report, I gained a clear understanding of how to create a basic algorithm, the steps involved in executing a program, the life cycle of an algorithm, and the method for drawing a flowchart to illustrate the algorithm's functionality.
Programming is really amazing! thanks to it I understand how the devices around us work This is very interesting and fantastic Thankyou my Mentor!
34 PERFOMED STUDENT: PHAN QUANG HOP
integrates many programs like code completion, compiler editor outlining the
I write a program that uses programming standards such as variable naming, standard function naming, and object naming, et cetera
+ In Winfom, there are a few different methods to name objects:
(OBJECT NAME SET NAME FOR OBJECT EXAMPLE
Link Label lIbl llblF acebook
Figure 9 standard versions of encryption Avoid giving your variables numerical names
The name of this function is:
- When describing its function must be concise
Capitalize the first two letters
- Each subcommand within a block must be indented, making it easier to understand the source code
24 PERFOMED STUDENT: PHAN QUANG HOP
- The straight column must be made of an open brace and a closed brace
Avoid using confusing code wherever you can and keep the length of the functions to a minimum
We will create a program to find the largest number between 2 numbers, and the largest number between 3 numbers
PERFOMED STUDENT: PHAN QUANG HOP
Figure 26 find the largest number among three numbers
Figure 27 find the largest number between 2 numbers synthesizes coding programs and compilers and applies many programming standards for example :
26 PERFOMED STUDENT: PHAN QUANG HOP š SBTEC
‘BTEC on mn txt number3 ŠSystem.Windows.Forr x
GenerateMemb: True Locked False Modifiers Private
H Focus Hee re=reMơslialơei—i Toren
Figure 28 use standard function naming for example :
RBD3 System.Windows.Forms.Radio x ee] DI
Text The text associated with the control
PERFOMED STUDENT: PHAN QUANG HOP
CHAPTER 4 M2 Analyze the common features that a developer has access to in an IDE
An Integrated Development Environment (IDE) is a comprehensive platform designed for writing and developing applications It combines essential tools such as compilers, interpreters, and debuggers, while also offering features like code formatting, syntax highlighting, folder organization, and code searching capabilities.
An Integrated Development Environment (IDE) simplifies and streamlines the application development process, although it is not strictly necessary for coding You can write source code without an IDE, as all you need to execute code in a specific programming language is the appropriate compiler for that language.
Analysis of the common characteristics of the IDE:
A word processing program is a type of software designed to edit electronic documents with some main functions as follows:
Display text content on screen
Allows users to modify and supplement at any position in the document
Display many different font styles (fonts), font sizes, colors
Images can be included in the text
28 PERFOMED STUDENT: PHAN QUANG HOP ° ‘BTEC we
There are various word processing programs on the market, with Microsoft Word being the most renowned among commercial software It is part of the Microsoft Office suite, which offers a range of tools for document creation and editing.
Console.WriteLine(" a "); string st = Console.ReadLine(); a = int.Parse(st);
Console.WriteLine(" b "); st = Console.ReadLine(); b = int.Parse(st);
Console.WriteLine("\n first degree equation {0}x +{1} =O ,", a,b); if (a == 6)
{ if (b == 9) { Console.WriteLine("\n The equation has infinitely many solutions."); else { x = (doubte)-b / a;
Console.WriteLine("\n valid equation x = {0}", Math.Round(x, 2)); }
Figure 31 text editor example Debugger, Compiler:
PERFOMED STUDENT: PHAN QUANG HOP
36 |] Console.WriteLine("\n The equation has infinitely many solutions.");
37 ] Console.WriteLine("\n valid equation x = {0}", Mat.Round(x, 2));
39 } q6 Í] Console.Read() mesue — -I(Ð2mmsljAshengjl@eMems= T]
™ Code Description Project File Line Suppression State
@ cs1026 ) expected phuongtinhbacnhat Program.cs 25 Active
€ CS1002 ; expected phuengtinhbacnhet Program.cs 43 AcEve
€9 C50103 The neme ‘Mat’ does not exist in the current context phuongtinhbacnhat Program.cs 37 Active
Figure 32 debug example, compiler Visual studio helps us detect the error on line 26 which is a structural error
Line 43 is missing the sign
- Complete the code and proceed to run the program
11 E static void Main(string[] args)
24 Console.WriteLine("\n first degree equation {0}x +{1} =O ,", a,b);
PERFOMED STUDENT: PHAN QUANG HOP
30 Console.WriteLine(" The equation has infinitely many solutions.");
37 Console.WriteLine(" valid equation x = {6}", Math.Round(x, 2));
# ˆ D:\code\phuongtinhbacnhat\phuongtinhbacnhat\bin\Debug\phuongtinhbacnhat.exe
Microsoft Visual Studio 2022 Supported Languages
Visual Studio, developed by Microsoft, is a powerful website programming support tool that originated as Project Boston in 1997 This comprehensive development solution combines various programming tools into a single, effective package, catering to the needs of developers in the technology sector.
The system that integrates a code editor, designer, and debugger for application development is called Visual Studio In other words, using just one Visual Studio program,
PERFOMED STUDENT: PHAN QUANG HOP
BTEC enables users to efficiently develop code, resolve bugs, and enhance application design Additionally, it allows for the creation of user interfaces and experiences in Visual Studio, similar to the process of developing Xamarin, Blend, or UWP applications using XAML.
PERFOMED STUDENT: PHAN QUANG HOP
After completing my assignment on programming and algorithm writing, I retained approximately 85% of the lesson content presented by my teacher For my final report, I gathered information from various sources, including teachers, friends, and online research Upon self-assessing my work, I determined that about 90% of the content was accurate, ultimately earning an M grade for this assignment.
33 PERFOMED STUDENT: PHAN QUANG HOP
Upon finishing this report, I gained a clear understanding of constructing a basic algorithm, executing a program, and the algorithm's life cycle Additionally, I learned how to create a flowchart to illustrate the workings of the algorithm.
Programming is really amazing! thanks to it I understand how the devices around us work This is very interesting and fantastic Thankyou my Mentor!
34 PERFOMED STUDENT: PHAN QUANG HOP