































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Programming is one of the subjects in which students must master the knowledge base, including understanding programming models such as procedural programming, object-oriented programming, and event-oriented programming, the structure of a program, data, and basic data, while also learning about the IDE, its functions, and some standard rules, such as naming in code. At the same time, it assists students in learning how to create simple apps.
Typology: Assignments
1 / 39
This page cannot be seen from the preview
Don't miss anything!
































PROGRAM TITLE: Programming UNIT TITLE: Programming ASSIGNMENT NUMBER: ASSIGNMENT NAME: Explain the characteristics of procedural, object-orientated, and event-driven programming SUBMISSION DATE: 20/10/ DATE RECEIVED:12/12/ TUTORIAL LECTURER: NGUYEN QUANG HUY WORD COUNT: 6714 STUDENT NAME: STUDENT ID: MOBILE NUMBER:
Summative Feedback: Internal verification:
You have been recently recruited as a junior application designer in one of the top IT companies in Vietnam. iBook hired the company to create a program for the books management system. Each book has an id, name, author, language, price, publish date, and ISBN. The system should have at least two main menus which are: I. Books a. insert a new book b. update a book c. delete a book d. display all II. Tools a. filter by author b. filter by language c. filter by price d. order by price desc Based on the context above, complete the following. Part 1: You have been tasked with creating a presentation on algorithms and their benefit to software development. As the results will need to be delivered to your peers, consider this as a mini-research project that will be presented. You will need to explain what an algorithm is, with examples of their use, comparing their efficiency against brute-forcing, and how it will relate to the application development process, down to the implementation in a suitable language. The presentation will be most effective if it includes an example and concludes with an evaluation of the implementation of the algorithm. Your research should be conducted on a choice of algorithms, including sorting, and searching data and/or encryption/decryption, compression/decompression. Note: The submission is in the form of a ten-minute Microsoft® PowerPoint® style presentation, you should be prepared to present to your colleagues before presenting to the customer. The presentation can include links to performance data with additional speaker notes. The presentation slides will need to be submitted with speaker notes. You are required to make effective use of headings, bullet points, and subsections as appropriate. Your research must be referenced using the Harvard referencing system. The recommended word limit is 500 words, including speaker notes, although you will not be penalized for exceeding the total word limit. Part 2: The research and development team you work with has been tasked with further investigation into how best to build more efficient, secure software. You have been asked to investigate programming paradigms and the advantages and disadvantages of using different programming language approaches. You will need to create a report covering findings from research into the characteristics of different
programming paradigms – procedural, object-orientated, and event-driven programming. Your report should include an explanation of each paradigm, an analysis of suitable IDEs, and an evaluation of source code that would be generated for an application. Note: The submission is in the form of an individual written report. This should be written in a concise, formal business style using single spacing and font size 12. You are required to make use of headings, paragraphs, and subsections as appropriate, and all work must be supported with research and referenced using the Harvard referencing system. Please also provide a bibliography using the Harvard referencing system. The recommended word limit is 2,000–2,500 words, although you will not be penalized for exceeding the total word limit. Part 3: You have been asked by your manager to develop a working application following your design and program specifications of the management system. The submission is in the form of five documents/files:
4.3 Critically evaluate why a coding standard is necessary in a team as well as for the individual..................................................................................................................... 37
First and foremost, I'd want to convey my heartfelt gratitude to my family for their unwavering encouragement, excitement, and support. I couldn't have done it without all of this. Second, I'd want to express my gratitude to instructor NGUYEN QUANG HUY for actively assisting me in achieving my academic goals, as well as for his assistance in the exercises and the information that he taught and taught. wholeheartedly solve. In addition, I'd want to express my gratitude to my BKACAD Academy of Technology colleagues for enabling me to share my expertise and assisting me in understanding the challenges in this course. Finally, I'd want to express my gratitude to the writers, brothers, sisters, and friends who have given me a wealth of information to utilize as references throughout this assignment.
Programming is one of the subjects in which students must master the knowledge base, including understanding programming models such as procedural programming, object- oriented programming, and event-oriented programming, the structure of a program, data, and basic data, while also learning about the IDE, its functions, and some standard rules, such as naming in code. At the same time, it assists students in learning how to create simple apps.
Definiteness (No Ambiguity): Each step of algorithm should be clearly and precisely defined and there should not be any ambiguity. Inputs: An algorithm must have zero or more but must be finite number of inputs. Example of zero input algorithm. Print the ASCII code of each of the letter in the alphabet of the computer system. Output: An algorithm must have at-least one desirable outcome, i.e., output. Effectiveness: An algorithm should be effective. Effective means that each step should be referred as principle and should be executing in finite time. d) Outline the process of programming an application. Defining the Problem Suppose that, as a programmer, you are contacted because your services are needed. You meet with users from the client organization to analyze the problem, or you meet with a systems analyst who outlines the project. Specifically, the task of defining the problem consists of identifying what it is you know (input-given data), and what it is you want to obtain (output-the result). Eventually, you produce a written agreement that, among other things, specifies the kind of input, processing, and output required. This is not a simple process. Planning the Solution Two common ways of planning the solution to a problem are to draw a flowchart and to write pseudocode, or possibly both. Essentially, a flowchart is a pictorial representation of a step-by-step solution to a problem. It consists of arrows representing the direction the program takes and boxes and other symbols representing actions. It is a map of what your program is going to do and how it is going to do it. The American National Standards Institute (ANSI) has developed a standard set of flowchart symbols. Figure 1 shows the symbols and how they might be used in a simple flowchart of a common everyday act-preparing a letter for mailing. Pseudocode is an English-like nonstandard language that lets you state your solution with more precision than you can in plain English but with less precision than is required when using a formal programming language. Pseudocode permits you to focus on the program logic without having to be concerned just yet about the precise syntax of a particular programming language. However, pseudocode is not executable on the computer. We will illustrate these later in this chapter, when we focus on language examples.
Coding the program As the programmer, your next step is to code the program-that is, to express your solution in a programming language. You will translate the logic from the flowchart or pseudocode-or some other tool-to a programming language. As we have already noted, a programming language is a set of rules that provides a way of instructing the computer what operations to perform. There are many programming languages: BASIC, COBOL, Pascal, FORTRAN, and C are some examples. You may find yourself working with one or more of these. We will discuss the different types of languages in detail later in this chapter. Although programming languages operate grammatically, somewhat like the English language, they are much more precise. To get your program to work, you have to follow exactly the rules-the syntax-of the language you are using. Of course, using the language correctly is no guarantee that your program will work, any more than speaking grammatically correct English means you know what you are talking about. The point is that correct use of the language is the required first step. Then your coded program must be keyed, probably using a terminal or personal computer, in a form the computer can understand. One more note here: Programmers usually use a text editor, which is
module. Prewritten programs from a system library may be added during the link/load phase, which results in a load module. The load module can then be executed by the computer. Debugging. A term used extensively in programming, debugging means detecting, locating, and correcting bugs (mistakes), usually by running the program. These bugs are logic errors, such as telling a computer to repeat an operation but not telling it how to stop repeating. In this phase you run the program using test data that you devise. You must plan the test data carefully to make sure you test every part of the program. Documenting the program Documenting is an ongoing, necessary process, although, as many programmers are, you may be eager to pursue more exciting computer- centered activities. Documentation is a written detailed description of the programming cycle and specific facts about the program. Typical program documentation materials include the origin and nature of the problem, a brief narrative description of the program, logic tools such as flowcharts and pseudocode, data-record descriptions, program listings, and testing results. Comments in the program itself are also considered an essential part of documentation. Many programmers document as they code. In a broader sense, program documentation can be part of the documentation for an entire system. The wise programmer continues to document the program throughout its design, development, and testing. Documentation is needed to supplement human memory and to help organize program planning. Also, documentation is critical to communicate with others who have an interest in the program, especially other programmers who may be part of a programming team. And, since turnover is high in the computer industry, written documentation is needed so that those who come after you can make any necessary modifications in the program or track down any errors that you missed. 1.2 Evaluate the implementation of an algorithm in a suitable language and the relationship between the written algorithm and the code variant. It uses the structural conventions of a normal programming language but is intended for human reading rather than machine reading. Pseudocode typically omits details that are essential for machine understanding of the algorithm, such as variable declarations, system-specific code, and some subroutines. The programming language is augmented with natural language description details, where convenient, or with compact mathematical notation. The purpose of using pseudocode is that it is easier for people to understand than conventional
programming language code and that it is an efficient and environment- independent description of the key principles of an algorithm. No standard for pseudocode syntax exists, as a program in pseudocode is not an executable program. So the main difference is that the code is a real executable program written with the need to be executable on a real machine rather than just a mechanism for communicating with a human. Algorithms aren't written in code. In the way that one completes the other, they are two different yet well-acquainted beings. "Algorithms are a set of instructions or calculations that, when executed, provide a result." The practical application of algorithms is code, which is defined as a set of instructions for a computer given using certain programming languages. It's vital to remember that an algorithm is first and foremost a set of mathematical operations that exists outside of the realm of Computer Science. Algorithms can be thought of as step-by-step formal instructions for solving a problem that is only abstract until it is implemented on a computer For example: Example: For an integer N, calculate 1 + 2 + 3 + ... N
a) Characteristics Service orientated: is a programming paradigm that is used to write programs that are made for services. If something is requested, the action is carried out, if a user wanted to minimize an application that they are using, they would click on the – icon in the top right of the page and the application will minimize into the task bar, this is service orientated. Time driven: Time driven in event driven programming is a paradigm, it is code that runs on a time trigger, this could be a piece of code that runs at a specific time, which could be once a week or whenever a program is launched, this means it is a pre-set task. An example of this is MAC OS X mavericks, it checks for updates at a specific time every day, if an update is found it informs you to do the update now or to postpone it to a later time or date. Event handles: Event handler is a function or method that takes place when a certain event happens, they are executed in response to a certain event that takes place, for example this could be on a button, when a button is clicked the code is ran, if the button is clicked again after that it will run again, this is an event handler. Trigger functions: Trigger functions decide what code is ran when a specific event occurs, they are used to choose when event handlers are ran for the event that occurs, most applications have a trigger function for each event that is likely to occur.
Advantages of event-driven paradigms: It allows for more interactive programs. Almost all modern GUI programs use event driven programming. It can be implemented using hardware interrupts, which will reduce the power used by the computer.
For simple programs, event driven programming is often more complex and cumbersome than batch programming. The flow of the program is usually less logical and obvious
a) Define Procedure-oriented programming (POP): is a traditional programming technique in which a program is divided into functions (subroutines). Each program can also be divided into many other subroutines to simplify their work. In structured programming, the program will be divided into many subfunctions and called in the main function. Some structure-oriented languages like C, Pascal...
Object-oriented programming is object-enabled programming (OOP) that increases productivity and simplifies software building and software maintenance, allowing programmers to focus on objects like In reality. Most of the popular languages today are object-oriented programming languages such as C#, java... b) Characteristics of the properties Abstraction: Means generalizing something up, without paying attention to the details inside. It doesn't care what the details are inside and people still understand it every time they hear about it. Encapsulation: Related data and methods are packaged into classes for easy management and use.
Inheritance: it allows us to build a class based on the definition of a created class. That means that the parent class can share data and methods between the child classes. When inheriting the child class, all the methods and properties of the parent class are inherited. Subclasses do not need to be redefined, other than extending the inherited components and adding new ones. Reuse the source code optimally, take advantage of the source code. Some common types of inheritance are single inheritance, multiple inheritances, multiple inheritances, hierarchical inheritance. Polymorphism: considered as an action that can be performed in many different ways. This is another property that can be considered as containing almost all the power of object-oriented programming.