SlideShare a Scribd company logo
1 of 4
Download to read offline
Part A. Two Searching Algorithm
Part 1.
The objectives of this particular case study are:
1. To learn the different searching algorithms and their behaviors.
2. To be able to implement two searching algorithms, namely: linear and binary search in Java programming
language.
3. To observe the relative performance of these different searching algorithms.
4. To explore programming involving the use of arrays and get to see array’s properties and way of manipulating
data.
5. To strengthen the discipline of self-study.
Part 2
Requirements: Write a Java program that will do the following in sequence:
Linear Search
1. Ask the user to input a positive integer value that we will denote as n. Here n represents the size of the
problem space, specifically, the number of random elements.
2. For linear search, the user will input the key/value that will be searched.
3. Once the key/value is found it will display the value including the index value.
4. It will also display the time that it searched in milliseconds.
Binary Search
1. Ask the user to input a positive integer value that we will denote as n. Here n represents the size of the
problem space, specifically, the number of random elements.
2. For binary search, the random number will be arranged in ascending order.
3. The user will input the key/value that will be searched.
3. Once the key/value is found it will display the value including the index value.
4. It will also display the time that it searched in milliseconds.
Note: the next value of n is computed as n = n * 2. For example, after n = 64 the next n is computed as 64 * 2 =
128.
n linear search binary search
processing time key processing time key
32
64
128
: :
: :
32768
65536
Part B. Ten Sorting Algorithms
Part 1.
The objectives of this particular case study are:
1. To learn the different sorting algorithms and their behaviors.
2. To be able to implement 10 sorting algorithms, namely: bubble sort, selection sort, insertion sort, quick sort,
shell, merge, radix and balloon sort in Java programming language.
3. To observe the relative performance of these different sorting algorithms.
4. To explore programming involving the use of arrays and get to see array’s properties and way of manipulating
data.
5. To strengthen the discipline of self-study, conducting research and working alone.
6. Add 2 more sorting algorithms of you own.
Requirements: Write a Java program that will do the following in sequence:
1. Ask the user to input a positive integer value that we will denote as n. Here n represents the size of the
problem space, specifically, the number of elements to be sorted.
2. Create arrays for 10 lists of n integers.
3. For one array, its initial values are to be generated randomly (use the random function/method of your
chosen library).
4. Copy the contents of the first array to the other ten arrays. After these step, all arrays should contain the
same sequence of integer values.
5. Introduce a count variable into each of your sorting algorithms to keep track of the number of operations.
You should able to discern well as to where should it best placed to count the “important” operations.
6. Sort the first array using bubble sort. Obtain the amount of time it took for bubble sort to rearrange the array
as well as the count on the number of operations.
7. Sort the second array using selection sort and obtain the time it took to rearrange the array as well as the
count on the number of operations.
8. Sort the third array using insertion sort and obtain the time it took to rearrange the array as well as the count
on the number of operations.
9. Sort the fourth array using quicksort and obtain the time it took to rearrange the array as well as the count
on the number of operations.
10. Sort the fifth array using shell sort and obtain the time it took to rearrange the array as well as the count on
the number of operations.
11. Sort the 6th
to 10th
array using merge, radix, balloon and 2 other sorting algorithm and obtain the time it
took to rearrange the array as well as the count on the number of operations.
Run the program for different values of n based on the order. Obtain the processing time for each sorting
algorithm and count, and fill up the following table. The processing time should be in milliseconds.
Include radix sort, balloon sort, merge sort and 2 other sorting algorithms that you chose
Include radix sort, balloon sort, merge sort and 2 other sorting algorithms that you chose
Note: the next value of n is computed as n = n * 2. For example, after n = 64 the next n is computed as 64 * 2 =
128.
Draw line graphs with x coordinates representing the values of n and y axis coordinates representing the
processing time for each sorting algorithm. Graphs should be overlaid.
Provide a concise discussion about the resulting graphs. Discussion can be (but not limited to):
(a) What observations can be made from it? Correlate the count and processing time for each sorting algorithm.
(b) Does the performance of each sorting algorithm differ or the same regardless of the sorting order?
(c) Does efficiency is seen when arranging the values in ascending order, descending order or both?
(d) Do any of the algorithms run consistently the quickest? Slowest?
Part 2.
Using the programs created in Part 1, test each sorting algorithm again, but this time under the following
scenarios:
1. Supply randomly generated values for one array where the values must be in descending order. This set of
values must be replicated in the other four arrays. Sort the array in ascending order. Obtain the processing time
and count for each sorting algorithm under different values of n as done in Part 1, and provide a discussion
based on the observation seen. Provide the line graph as well.
2. Perform the process in #1, but this time, the set of randomly generated values must be in ascending order
and you are to sort the data in descending order. Obtain the processing time and count for each sorting
algorithm under different values of n as done in Part 1, and provide a discussion based on the observation seen.
Provide the line graph as well.
Part 3
Provide an overall conclusion based on the experiments did in Part 1 and Part 2. You should able to consolidate
your analysis from both parts, do comparison and contrast as necessary. Provide in your discussion the
identified program/time complexity of these algorithms as the value of n → infinity.
General Requirements:
1. You are to submit all the works did in this project in both printed document and electronic form on or before
the specified due date. Submission of the printed document should be in A4 bond paper with short, white
sliding folder. Submission of both versions must be done on the same day. In the event that one of the
requirements is submitted at the latter date, that date will be considered as individual’s submission.
2. This project is mandatory for all the students in the lecture and laboratory class.
3. For the electronic version of your assignment: use the concatenated last names as filename and .java as the
extension. For example if your last name is SANTOS, the file name should be santos.java (for Java program). PDF
version on the tables and other needed documents. Email the electronic version to
____________________________ with subject heading as: PrelimProject-<Lastname of Person 1 (ID#)>. For
example: PrelimProject-Santos(100893454).
4. The printed document should contain the following:
- An introduction of the prelim project
- A presentation, discussion and illustrations for both Part A and Part B.
- Include the source code in your documentation. One column per page only.
5. The printed document should be written in single-spaced, font name: Arial, font size: 12 with one- inch
margin on each side.
6. Cover page with title, name of student is included. Timeline (using MS Project) should be at the last page.
Design Day: (Project Defense) on CPE40-Oct 11; CPE41-Oct 10; CPE42-Oct 12;

More Related Content

What's hot

Database structure Structures Link list and trees and Recurison complete
Database structure Structures Link list and trees and Recurison complete  Database structure Structures Link list and trees and Recurison complete
Database structure Structures Link list and trees and Recurison complete Adnan abid
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...ijceronline
 
Class 4: Making Procedures
Class 4: Making ProceduresClass 4: Making Procedures
Class 4: Making ProceduresDavid Evans
 
Class test 1 question paper
Class test 1 question paperClass test 1 question paper
Class test 1 question paperKuntal Bhowmick
 
Class test 1 question paper
Class test 1 question paperClass test 1 question paper
Class test 1 question paperKuntal Bhowmick
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithmsJulie Iskander
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and AlgorithmDhaval Kaneria
 
Unit 1 polynomial manipulation
Unit 1   polynomial manipulationUnit 1   polynomial manipulation
Unit 1 polynomial manipulationLavanyaJ28
 
Dynamic Memory & Linked Lists
Dynamic Memory & Linked ListsDynamic Memory & Linked Lists
Dynamic Memory & Linked ListsAfaq Mansoor Khan
 
R Programming: Introduction to Vectors
R Programming: Introduction to VectorsR Programming: Introduction to Vectors
R Programming: Introduction to VectorsRsquared Academy
 
Introduction To Programming with Python-4
Introduction To Programming with Python-4Introduction To Programming with Python-4
Introduction To Programming with Python-4Syed Farjad Zia Zaidi
 
Ap Power Point Chpt6
Ap Power Point Chpt6Ap Power Point Chpt6
Ap Power Point Chpt6dplunkett
 
L9 wrapper classes
L9 wrapper classesL9 wrapper classes
L9 wrapper classesteach4uin
 

What's hot (20)

Database structure Structures Link list and trees and Recurison complete
Database structure Structures Link list and trees and Recurison complete  Database structure Structures Link list and trees and Recurison complete
Database structure Structures Link list and trees and Recurison complete
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 
Data structures
Data structuresData structures
Data structures
 
Oop sample ktu
Oop sample ktuOop sample ktu
Oop sample ktu
 
Class 4: Making Procedures
Class 4: Making ProceduresClass 4: Making Procedures
Class 4: Making Procedures
 
A08
A08A08
A08
 
Class test 1 question paper
Class test 1 question paperClass test 1 question paper
Class test 1 question paper
 
Class test 1 question paper
Class test 1 question paperClass test 1 question paper
Class test 1 question paper
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and Algorithm
 
Basic data-structures-v.1.1
Basic data-structures-v.1.1Basic data-structures-v.1.1
Basic data-structures-v.1.1
 
Unit 1 polynomial manipulation
Unit 1   polynomial manipulationUnit 1   polynomial manipulation
Unit 1 polynomial manipulation
 
Dynamic Memory & Linked Lists
Dynamic Memory & Linked ListsDynamic Memory & Linked Lists
Dynamic Memory & Linked Lists
 
Unit 5
Unit 5Unit 5
Unit 5
 
Run time storage
Run time storageRun time storage
Run time storage
 
R Programming: Introduction to Vectors
R Programming: Introduction to VectorsR Programming: Introduction to Vectors
R Programming: Introduction to Vectors
 
Introduction To Programming with Python-4
Introduction To Programming with Python-4Introduction To Programming with Python-4
Introduction To Programming with Python-4
 
Algorithms.
Algorithms. Algorithms.
Algorithms.
 
Ap Power Point Chpt6
Ap Power Point Chpt6Ap Power Point Chpt6
Ap Power Point Chpt6
 
L9 wrapper classes
L9 wrapper classesL9 wrapper classes
L9 wrapper classes
 

Similar to Prelim Project OOP

ADSA orientation.pptx
ADSA orientation.pptxADSA orientation.pptx
ADSA orientation.pptxKiran Babar
 
Lab exp declaring arrays)
Lab exp declaring arrays)Lab exp declaring arrays)
Lab exp declaring arrays)Daman Toor
 
SE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUSSE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUSnikshaikh786
 
Data structure and algorithm.
Data structure and algorithm. Data structure and algorithm.
Data structure and algorithm. Abdul salam
 
Data-Structure-Algorithms-.docx
Data-Structure-Algorithms-.docxData-Structure-Algorithms-.docx
Data-Structure-Algorithms-.docxKedarkamal
 
Lewis jssap3 e_labman02
Lewis jssap3 e_labman02Lewis jssap3 e_labman02
Lewis jssap3 e_labman02auswhit
 
CIS 1403 lab 3 functions and methods in Java
CIS 1403 lab 3 functions and methods in JavaCIS 1403 lab 3 functions and methods in Java
CIS 1403 lab 3 functions and methods in JavaHamad Odhabi
 
1 Project 2 Introduction - the SeaPort Project seri.docx
1  Project 2 Introduction - the SeaPort Project seri.docx1  Project 2 Introduction - the SeaPort Project seri.docx
1 Project 2 Introduction - the SeaPort Project seri.docxhoney725342
 
Data Structures 2004
Data Structures 2004Data Structures 2004
Data Structures 2004Sanjay Goel
 
The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)theijes
 
Exercise1[5points]Create the following classe
Exercise1[5points]Create the following classeExercise1[5points]Create the following classe
Exercise1[5points]Create the following classemecklenburgstrelitzh
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7solutionjug4
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7helpido9
 

Similar to Prelim Project OOP (20)

ADSA orientation.pptx
ADSA orientation.pptxADSA orientation.pptx
ADSA orientation.pptx
 
Lab exp declaring arrays)
Lab exp declaring arrays)Lab exp declaring arrays)
Lab exp declaring arrays)
 
SE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUSSE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUS
 
COMPUTER LABORATORY-4 LAB MANUAL BE COMPUTER ENGINEERING
COMPUTER LABORATORY-4 LAB MANUAL BE COMPUTER ENGINEERINGCOMPUTER LABORATORY-4 LAB MANUAL BE COMPUTER ENGINEERING
COMPUTER LABORATORY-4 LAB MANUAL BE COMPUTER ENGINEERING
 
Data structure and algorithm.
Data structure and algorithm. Data structure and algorithm.
Data structure and algorithm.
 
DATA STRUCTURE.pdf
DATA STRUCTURE.pdfDATA STRUCTURE.pdf
DATA STRUCTURE.pdf
 
DATA STRUCTURE
DATA STRUCTUREDATA STRUCTURE
DATA STRUCTURE
 
Data-Structure-Algorithms-.docx
Data-Structure-Algorithms-.docxData-Structure-Algorithms-.docx
Data-Structure-Algorithms-.docx
 
17515
1751517515
17515
 
Lewis jssap3 e_labman02
Lewis jssap3 e_labman02Lewis jssap3 e_labman02
Lewis jssap3 e_labman02
 
CIS 1403 lab 3 functions and methods in Java
CIS 1403 lab 3 functions and methods in JavaCIS 1403 lab 3 functions and methods in Java
CIS 1403 lab 3 functions and methods in Java
 
UNIT-2-PPTS-DAA.ppt
UNIT-2-PPTS-DAA.pptUNIT-2-PPTS-DAA.ppt
UNIT-2-PPTS-DAA.ppt
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 
1 Project 2 Introduction - the SeaPort Project seri.docx
1  Project 2 Introduction - the SeaPort Project seri.docx1  Project 2 Introduction - the SeaPort Project seri.docx
1 Project 2 Introduction - the SeaPort Project seri.docx
 
Data Structures 2004
Data Structures 2004Data Structures 2004
Data Structures 2004
 
The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)
 
Numerical data.
Numerical data.Numerical data.
Numerical data.
 
Exercise1[5points]Create the following classe
Exercise1[5points]Create the following classeExercise1[5points]Create the following classe
Exercise1[5points]Create the following classe
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7
 

More from Dwight Sabio

Human Rights Observatory Description
Human Rights Observatory DescriptionHuman Rights Observatory Description
Human Rights Observatory DescriptionDwight Sabio
 
RIGHTS-BASED SUSTAINABLE DEVELOPMENT GOALS MONITOR
RIGHTS-BASED SUSTAINABLE DEVELOPMENT GOALS MONITORRIGHTS-BASED SUSTAINABLE DEVELOPMENT GOALS MONITOR
RIGHTS-BASED SUSTAINABLE DEVELOPMENT GOALS MONITORDwight Sabio
 
Report on Girl Children: A Rapid Assessment of their Situation
Report on Girl Children: A Rapid Assessment of their SituationReport on Girl Children: A Rapid Assessment of their Situation
Report on Girl Children: A Rapid Assessment of their SituationDwight Sabio
 
Gender ombud report 2016 final
Gender ombud report 2016 finalGender ombud report 2016 final
Gender ombud report 2016 finalDwight Sabio
 
Strengthening legal referral mechanisms on cases of gender
Strengthening legal referral mechanisms on cases of genderStrengthening legal referral mechanisms on cases of gender
Strengthening legal referral mechanisms on cases of genderDwight Sabio
 
CPU scheduling ppt file
CPU scheduling ppt fileCPU scheduling ppt file
CPU scheduling ppt fileDwight Sabio
 
OperatingSystemChp3
OperatingSystemChp3OperatingSystemChp3
OperatingSystemChp3Dwight Sabio
 
Programming Problem 3
Programming Problem 3Programming Problem 3
Programming Problem 3Dwight Sabio
 
Programming Problem 2
Programming Problem 2Programming Problem 2
Programming Problem 2Dwight Sabio
 
Midterm Project Specification
Midterm Project Specification Midterm Project Specification
Midterm Project Specification Dwight Sabio
 
Game Design Document
Game Design DocumentGame Design Document
Game Design DocumentDwight Sabio
 
ProgrammingProblem
ProgrammingProblemProgrammingProblem
ProgrammingProblemDwight Sabio
 

More from Dwight Sabio (20)

Human Rights Observatory Description
Human Rights Observatory DescriptionHuman Rights Observatory Description
Human Rights Observatory Description
 
RIGHTS-BASED SUSTAINABLE DEVELOPMENT GOALS MONITOR
RIGHTS-BASED SUSTAINABLE DEVELOPMENT GOALS MONITORRIGHTS-BASED SUSTAINABLE DEVELOPMENT GOALS MONITOR
RIGHTS-BASED SUSTAINABLE DEVELOPMENT GOALS MONITOR
 
Report on Girl Children: A Rapid Assessment of their Situation
Report on Girl Children: A Rapid Assessment of their SituationReport on Girl Children: A Rapid Assessment of their Situation
Report on Girl Children: A Rapid Assessment of their Situation
 
Gender ombud report 2016 final
Gender ombud report 2016 finalGender ombud report 2016 final
Gender ombud report 2016 final
 
Strengthening legal referral mechanisms on cases of gender
Strengthening legal referral mechanisms on cases of genderStrengthening legal referral mechanisms on cases of gender
Strengthening legal referral mechanisms on cases of gender
 
IP Report
IP ReportIP Report
IP Report
 
CPU scheduling ppt file
CPU scheduling ppt fileCPU scheduling ppt file
CPU scheduling ppt file
 
Ch3OperSys
Ch3OperSysCh3OperSys
Ch3OperSys
 
OperatingSystemChp3
OperatingSystemChp3OperatingSystemChp3
OperatingSystemChp3
 
ABC Supermarket
ABC SupermarketABC Supermarket
ABC Supermarket
 
Programming Problem 3
Programming Problem 3Programming Problem 3
Programming Problem 3
 
Lab Activity
Lab ActivityLab Activity
Lab Activity
 
Bluetooth
Bluetooth Bluetooth
Bluetooth
 
Programming Problem 2
Programming Problem 2Programming Problem 2
Programming Problem 2
 
Arduino e-book
Arduino e-bookArduino e-book
Arduino e-book
 
Midterm Project Specification
Midterm Project Specification Midterm Project Specification
Midterm Project Specification
 
Game Design Document
Game Design DocumentGame Design Document
Game Design Document
 
Class diagram
Class diagramClass diagram
Class diagram
 
Midterm Project
Midterm Project Midterm Project
Midterm Project
 
ProgrammingProblem
ProgrammingProblemProgrammingProblem
ProgrammingProblem
 

Recently uploaded

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 

Recently uploaded (20)

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 

Prelim Project OOP

  • 1. Part A. Two Searching Algorithm Part 1. The objectives of this particular case study are: 1. To learn the different searching algorithms and their behaviors. 2. To be able to implement two searching algorithms, namely: linear and binary search in Java programming language. 3. To observe the relative performance of these different searching algorithms. 4. To explore programming involving the use of arrays and get to see array’s properties and way of manipulating data. 5. To strengthen the discipline of self-study. Part 2 Requirements: Write a Java program that will do the following in sequence: Linear Search 1. Ask the user to input a positive integer value that we will denote as n. Here n represents the size of the problem space, specifically, the number of random elements. 2. For linear search, the user will input the key/value that will be searched. 3. Once the key/value is found it will display the value including the index value. 4. It will also display the time that it searched in milliseconds. Binary Search 1. Ask the user to input a positive integer value that we will denote as n. Here n represents the size of the problem space, specifically, the number of random elements. 2. For binary search, the random number will be arranged in ascending order. 3. The user will input the key/value that will be searched. 3. Once the key/value is found it will display the value including the index value. 4. It will also display the time that it searched in milliseconds. Note: the next value of n is computed as n = n * 2. For example, after n = 64 the next n is computed as 64 * 2 = 128. n linear search binary search processing time key processing time key 32 64 128 : : : : 32768 65536
  • 2. Part B. Ten Sorting Algorithms Part 1. The objectives of this particular case study are: 1. To learn the different sorting algorithms and their behaviors. 2. To be able to implement 10 sorting algorithms, namely: bubble sort, selection sort, insertion sort, quick sort, shell, merge, radix and balloon sort in Java programming language. 3. To observe the relative performance of these different sorting algorithms. 4. To explore programming involving the use of arrays and get to see array’s properties and way of manipulating data. 5. To strengthen the discipline of self-study, conducting research and working alone. 6. Add 2 more sorting algorithms of you own. Requirements: Write a Java program that will do the following in sequence: 1. Ask the user to input a positive integer value that we will denote as n. Here n represents the size of the problem space, specifically, the number of elements to be sorted. 2. Create arrays for 10 lists of n integers. 3. For one array, its initial values are to be generated randomly (use the random function/method of your chosen library). 4. Copy the contents of the first array to the other ten arrays. After these step, all arrays should contain the same sequence of integer values. 5. Introduce a count variable into each of your sorting algorithms to keep track of the number of operations. You should able to discern well as to where should it best placed to count the “important” operations. 6. Sort the first array using bubble sort. Obtain the amount of time it took for bubble sort to rearrange the array as well as the count on the number of operations. 7. Sort the second array using selection sort and obtain the time it took to rearrange the array as well as the count on the number of operations. 8. Sort the third array using insertion sort and obtain the time it took to rearrange the array as well as the count on the number of operations. 9. Sort the fourth array using quicksort and obtain the time it took to rearrange the array as well as the count on the number of operations. 10. Sort the fifth array using shell sort and obtain the time it took to rearrange the array as well as the count on the number of operations. 11. Sort the 6th to 10th array using merge, radix, balloon and 2 other sorting algorithm and obtain the time it took to rearrange the array as well as the count on the number of operations. Run the program for different values of n based on the order. Obtain the processing time for each sorting algorithm and count, and fill up the following table. The processing time should be in milliseconds.
  • 3. Include radix sort, balloon sort, merge sort and 2 other sorting algorithms that you chose Include radix sort, balloon sort, merge sort and 2 other sorting algorithms that you chose Note: the next value of n is computed as n = n * 2. For example, after n = 64 the next n is computed as 64 * 2 = 128. Draw line graphs with x coordinates representing the values of n and y axis coordinates representing the processing time for each sorting algorithm. Graphs should be overlaid. Provide a concise discussion about the resulting graphs. Discussion can be (but not limited to): (a) What observations can be made from it? Correlate the count and processing time for each sorting algorithm. (b) Does the performance of each sorting algorithm differ or the same regardless of the sorting order? (c) Does efficiency is seen when arranging the values in ascending order, descending order or both? (d) Do any of the algorithms run consistently the quickest? Slowest? Part 2. Using the programs created in Part 1, test each sorting algorithm again, but this time under the following scenarios: 1. Supply randomly generated values for one array where the values must be in descending order. This set of values must be replicated in the other four arrays. Sort the array in ascending order. Obtain the processing time and count for each sorting algorithm under different values of n as done in Part 1, and provide a discussion based on the observation seen. Provide the line graph as well. 2. Perform the process in #1, but this time, the set of randomly generated values must be in ascending order and you are to sort the data in descending order. Obtain the processing time and count for each sorting algorithm under different values of n as done in Part 1, and provide a discussion based on the observation seen.
  • 4. Provide the line graph as well. Part 3 Provide an overall conclusion based on the experiments did in Part 1 and Part 2. You should able to consolidate your analysis from both parts, do comparison and contrast as necessary. Provide in your discussion the identified program/time complexity of these algorithms as the value of n → infinity. General Requirements: 1. You are to submit all the works did in this project in both printed document and electronic form on or before the specified due date. Submission of the printed document should be in A4 bond paper with short, white sliding folder. Submission of both versions must be done on the same day. In the event that one of the requirements is submitted at the latter date, that date will be considered as individual’s submission. 2. This project is mandatory for all the students in the lecture and laboratory class. 3. For the electronic version of your assignment: use the concatenated last names as filename and .java as the extension. For example if your last name is SANTOS, the file name should be santos.java (for Java program). PDF version on the tables and other needed documents. Email the electronic version to ____________________________ with subject heading as: PrelimProject-<Lastname of Person 1 (ID#)>. For example: PrelimProject-Santos(100893454). 4. The printed document should contain the following: - An introduction of the prelim project - A presentation, discussion and illustrations for both Part A and Part B. - Include the source code in your documentation. One column per page only. 5. The printed document should be written in single-spaced, font name: Arial, font size: 12 with one- inch margin on each side. 6. Cover page with title, name of student is included. Timeline (using MS Project) should be at the last page. Design Day: (Project Defense) on CPE40-Oct 11; CPE41-Oct 10; CPE42-Oct 12;