0% found this document useful (0 votes)
22 views2 pages

Define Algorithm and Its Applications

Uploaded by

fhasna521
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views2 pages

Define Algorithm and Its Applications

Uploaded by

fhasna521
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Higher National Diploma in Information Technology

Second Year, Second Semester Examination – 2021


HNDIT2022- Software Development -Model Paper
Instructions for Candidates: No. of questions: 06
Answer any five (5) Questions No. of pages 02
All questions carry equal marks. Time : 03 hours

Question 1 (20 marks)

I. Define an Algorithm?
II. State the usage of if statement in computer programming?
III. Write algorithms to solve the problems given below.
a) Gross pay depends on the pay rate and the number of hours worked per week.
However, if you work more than 45 hours, you get paid time-and-a-half for all
hours worked over 40. Write algorithm to compute gross pay given pay rate and
hours worked.
b) A number divisible by 2 is considered an even number, while a number which is
not divisible by 2 is considered an odd number. Write pseudo-code to display first
N odd/even numbers.
c) Find the minimum number of given numeric array

Question 2 (20 marks)

I. State two differences between linear and non-linear data structure


II. Mention two examples for non-linear data structures.
III. State two differences between arrays and linked list
IV. Do you agree the statement "Arrays are heterogenous"? Justify your answer.
V. Write an algorithm to dequeue operation in Queue data structure.
VI. Mention an algorithm to push operation (insert) in stack data structure.

Question 3 (20 marks)

I. What is the usage of recursion function in programming?

II. What is software quality?


III. State the usage of Gray- Box testing
IV. Suppose you have been asked to check an input field that can accept maximum of 10
characters.
State the test scenario and mention three test cases of the scenario given above.
V. Define automation testing
Question 4 (20 marks)

I. Compare system software and application software.


II. State two usages of firmware.
III. What is average case efficiency in an algorithm.
IV. Write an algorithm to represent the insertion sort.
V. Arrange the list shown below in ascending order using insertion sort algorithm. (It is
required to show the steps or passes).
6,15,5,8,17,26,10

Question 5 (20 marks)

I. What is file handling in computer programming? State two operations in file handling.

II. State user interface design process.


III. Write an algorithm to represent binary search.
IV. Mention the steps to be followed to find the key value 78 from the list shown below
using binary search algorithm. (Clearly show the steps)
5,16,45,69,78,99,102

Question 6

Write short notes on followings (20 marks)


I. Hybrid clouds
II. Product documentation
III. Procedures
IV. Utility Software
V. RAD model

Common questions

Powered by AI

Recursion provides a means to simplify problem-solving by breaking down complex tasks into simpler, identical subproblems. Unlike iterative approaches, recursion can lead to more intuitive code for problems like tree traversals or divide-and-conquer algorithms, though careful implementation is needed to avoid high memory usage due to deep call stacks .

The RAD model significantly accelerates software development by emphasizing rapid prototyping and iterative user feedback, fostering user-centric application creation. It allows continuous user involvement, ensuring needs are met throughout the development lifecycle and enables dynamic adjustments, enhancing product relevance and reducing time-to-market .

Gray-box testing, blending both white-box and black-box testing techniques, improves software quality by evaluating software's internal logic while ensuring functional correctness. It exploits partial knowledge of the underlying code to design comprehensive test cases, thus enhancing coverage and identifying potential reliability issues that might be missed by solely black-box tests .

Linear data structures, such as arrays and linked lists, store elements in a sequential manner, allowing straightforward traversal. Non-linear structures, like trees and graphs, store elements hierarchically, offering more complex relationships. Non-linear structures enable efficient data handling for operations requiring multi-level data relationships, unlike linear forms that may require more time on complex queries .

System software acts as a bridge between hardware and user applications, managing core functions like memory and process management (e.g., operating systems), whereas application software caters to end-user needs, performing tasks like word processing or web browsing. These functional roles define system software as essential to computing environment operability and application software as adaptable tools for user-specific tasks .

Hybrid clouds combine private and public cloud resources, offering scalability and security. They enable businesses to easily scale infrastructure on-demand, optimize costs through mixed onsite and offsite resources, and support strategic workload distribution, maintaining flexibility and control over sensitive data while leveraging cloud computing's benefits .

Insertion sort, ideal for small-sized data or partially sorted lists, processes elements individually, placing them in the correct position. The average-case time complexity is O(n^2), derived from evaluating each element against an increasing sorted subsection. Despite its inefficiency for large datasets compared to algorithms like quicksort, it provides simplicity and stability, effective for applications requiring minimal auxiliary space or real-time sorting .

The statement 'Arrays are heterogeneous' is generally incorrect as arrays typically store homogeneous elements, allowing for efficient index-based access. In comparison, linked lists store nodes with potentially heterogeneous data types. Arrays excel in uniformity and contiguous memory allocation, which simplifies access patterns, contrasting with the flexibility offered by linked lists in data diversity and dynamic sizing .

File handling in programming provides structured storage and manipulation of data, essential for persistent data storage beyond program execution. Basic operations include opening files, reading data, writing data, and closing files, which facilitate data retrieval and storage, ensuring data persistence and organization .

Algorithms provide a step-by-step procedure for solving problems like computing gross pay by specifying calculations for standard and overtime hours. They allow programmers to define precise operations needed, such as determining if hours exceed 45 and applying the correct pay rate, ensuring accurate salary computations.

You might also like