Download Understanding Programming Paradigms and IDE Usage in Java and more Study Guides, Projects, Research Java Programming in PDF only on Docsity!
PROGRAM TITLE: …… PROGRAMMING ………………………
UNIT TITLE: ……………… Unit 1: Programming …………………….
ASSIGNMENT NUMBER: ………… 01 ………………………
ASSIGNMENT NAME: …… Book Management System …………. SUBMISSION DATE: ……… February 13, 2022 ……………………. DATE RECEIVED: ……………………………………………. TUTORIAL LECTURER: Luong Thi Thao Hieu ……… WORD COUNT: ………… 11000 ………………………………….
STUDENT NAME: …… Ngo Minh Tuan ……….………
STUDENT ID: ……… BKC 12294 ………………………
MOBILE NUMBER: ………… 0379681318 …….….
Summative Feedback: Internal verification:
LO1. Define basic algorithms to carry out an operation and outline the process of programming an application. LO2. Explain the characteristics of procedural, object-orientated, and event- driven programming. LO3. Implement basic algorithms in code using an IDE. LO4. Determine the debugging process and explain the importance of a coding standard. Assignment Brief and Guidance 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
Pass Merit Distinction LO1 Define basic algorithms to carry out an operation and outline the process of programming an application D1 Evaluate the implementation of an algorithm in a suitable language and the relationship between the written algorithm and the code variant. P1 Provide a definition of what an algorithm is and outline the process in building an application. M1 Determine the steps taken from writing code to execution. LO2 Explain the characteristics of procedural, object- orientated and event-driven programming. D2 Critically evaluate the source code of an application which implements the procedural, object- orientated and event driven paradigms, in terms of the code structure and characteristics. P2 Give explanations of what procedural, object- orientated and event- driven paradigms are; their characteristics and the relationship between them. M2 Compare and contrast the procedural, object orientated and event driven paradigms used in given source code of an application LO3 Implement basic algorithms in code using an IDE (^) D3 Evaluate the use of an IDE for development of applications contrasted with not using an IDE. P3 Write a program that implements an algorithm using an IDE. M3 Use the IDE to manage the development process of the program LO4 Determine the debugging process and explain the importance of a coding standard D4 Critically evaluate why a coding standard is necessary in a team as well as for the individual. P4 Explain the debugging process and explain the M4 Evaluate how the debugging process can be used to help develop more
debugging facilities available in the IDE. P5 Outline the coding standard you have used in your code. secure, robust applications.
Higher Nationals
Assignment Brief – BTEC (RQF) ....................................................................... 3 A. Introduction................................................................................................... 10 B. Content. ........................................................................................................ 11 I. Algorithm. ................................................................................................ 11
- Algorithm definition. ............................................................................. 11
- Algorithm in life. ................................................................................... 12
- Differences between pseudocode and flowchart: ................................... 15
- Characteristics of algorithm. .................................................................. 17
- Types of Algorithms. ............................................................................. 18 II. Steps in program development. ................................................................. 23
- Defining and analyzing the problem. ..................................................... 24
- Planning and Designing Program........................................................... 25
- Coding. .................................................................................................. 25
- Testing and Debugging. ......................................................................... 28
- Compiling, Documenting and Saving. ................................................... 29
- Maintenance and upgrading. .................................................................. 30 III. Evaluate the implementation of an algorithm in a suitable language and the relationship between the written algorithm and the code variant. ...................... 32
- The role of coding standard and why a coding standard is necessary in a team as well as for the individual? ................................................................ 83
- Advantages of coding standard.............................................................. 86 XI. Using IDE. ................................................................................................ 87 Steps of Installation of NetBeans on Windows ...................................... 87 C. Conclusion. ................................................................................................... 91 D. Reference. ..................................................................................................... 92
A.Introduction.
- A central theme in computing is the design of a process for carrying out a task. The task might be sorting names into alphabetical order, finding the cheapest way to link a set of computing sites into a network, converting a number to its representation in the binary system, encrypting a message for secure transmission,
designing a digital circuit for a microchip, or determining the shortest path to be followed by a robotic arm. There will be many occasions throughout this book when we will find ourselves investigating problems of this nature, and asking: How can this task be performed by a person or a computer? In each case, the answer will take the form of a precise sequence of steps known as an algorithm.
B. Content.
I. Algorithm.
1. Algorithm definition.
- In basic terms, an algorithm is a set of well-defined steps or rules that you need to follow to obtain a pre-determined result. For instance, when we talk about algorithms in computer programming, we already have our input and we know the expected output. Now, an algorithm would be all the defined steps to follow on the input to get the desired output.
- Therefore, the entire algorithm flowchart would have three major components:
- Input : What we already know or the things we have to begin with.
- Algorithm : A set of sequenced steps that we need to follow one by one.
- Output : The expected results we need to achieve in the end.
4. Take your card, cash and transaction slip:
- Algorithms and their process can be display in 2 ways: Pseudocode and Flowchart. Pseudocode is a plain language description of the steps in an algorithm or another system. Pseudocode often uses structural conventions of a normal programming language, but is intended for human reading rather than machine reading.
In contrast, Flowchart is a graphical representation of an algorithm. Programmers often use it as a program-planning tool to solve a problem. It makes use of symbols which are connected among them to indicate the flow of information and processing.
- Flowchart symbols meaning: Example of a simple Flowchart in ATM algorithm:
- Besides, there is no particular programming language to write a pseudocode. Unlike in regular programming languages, there is no syntax to follow when writing a pseudocode. Furthermore, it is possible to use pseudocodes using simple English language statements.
- A flowchart represents an algorithm using a diagram. Furthermore, flowchart diagrams are commonly used in programming to find the steps to write a program.
- A simple flowchart for marks calculation is as follows. In it, the oval shape denotes the start and end. And, the rhombus shape represents inputs and outputs. Entering marks is an input while displaying marks is an output. Further, the diamond shape symbol represents the decision selection. Depending on the decision, the correct output will be displayed.
- A flow chart represents the sequence of steps to follow in order to solve the problem. Thus, the flowchart diagrams are easier to draw and understand.
- In overall, Pseudocode is an informal high-level description of the operating principle of an algorithm while a flowchart is a diagrammatic representation that illustrates a solution model to a given problem. Thus, this is the main difference between Pseudocode and Flowchart.
4. Characteristics of algorithm.
- An algorithm must possess following characteristics:
- Finiteness: An algorithm should have finite number of steps and it should end after a finite time.
- Input: An algorithm may have many inputs or no inputs at all. As in the above ATM example, our debit is an input:
- Output: It should result at least one output. And of cause, the output of ATM is cash
- Definiteness: Each step must be clear, well-defined and precise. There should be no any ambiguity. This can be seen in ATM menu interface:
- This is the most common type in which we devise a solution by exploring all the possible scenarios.
- A brute force algorithm blindly iterates all possible solutions to search one or more than one solution that may solve a function. Think of brute force as using all possible combinations of numbers to open a safe.
- Here is an example of Sequential Search done by using brute force:
- Input n = 5 with the elements of array are: 1 3 5 7 9, and x = 7 is the number need to be found, we’ll get the following Output:
- X is in the 4th^ position of the array. 2) Greedy algorithm.
- These algorithms are used for solving optimization problems. In this algorithm, we find a locally optimum solution (without any regard for any consequence in future) and hope to find the optimal solution at the global level.
- The method does not guarantee that we will be able to find an optimal solution.
- The algorithm has 5 components: The first one is a candidate set from which we try to find a solution. A selection function that helps choose the best possible candidate. A feasibility function that helps in deciding if the candidate can be used to find a solution. An objective function that assigns value to a possible solution or to a partial solution Solution function that tells when we have found a solution to the problem.
- Overview of Greedy Algorithm: 3) Divide and conquer algorithm:
- This is another effective way of solving many problems. In Divide and Conquer algorithms, divide the algorithm into two parts; the first parts divide the problem on hand into smaller subproblems of the same type. Then, in the second part, these smaller problems are solved and then added together (combined) to produce the problem’s final solution.