Posts

Showing posts with the label Algorithms and Data Structures

Assignment 2: Rolosort in C++ with header file implementation

Buy now Rolodex Sort: A Rolodex is a rotating file, usually used to record business contact information. Cards are inserted in alphabetic order by name. You operate the Rolodex by rolling it forwards or backwards until you find the information you need (or find the place where a new card should be added). Task Your task is to create a class that simulates a Rolodex, then use it to implement a word-sorting program. The program starts with an empty Rolodex, then reads words from standard input and adds a card for each word in the appropriate position to maintain overall sorted order. To find the correct position, the Rolodex is rolled either backwards or forwards from the current card. When all input has been processed, the program moves the Rolodex to the beginning and then outputs each word in order, one per line.  Source Code Requirements: Download the file rolosort_0.zip, which contains a basic version of the program and a skeleton version of the Rolodex class. The class has meth...

Hash Map and Tree Map for words listing from .txt file using Java GUI CSCI 212 – Project 4

Project Description Continuing the theme of project 3, adjust the program so that the left text area displays the words using a Hashmap (the order of the words will be unpredictable), and the right text area displays the words using a TreeMap (the words should be in sorted order). If you did not get project 3 to work entirely, you are not responsible for the menus and menu items for the project, or for adding additional words, or for displaying only nouns or verbs. For project 4 you are only responsible for displaying the original input file in the two text areas as described above. Buy now CONTACT DETAILS For any other questions or other tasks please feel free to contact me via email: mhassnainjamil@gmail.com via WhatsApp: +92-324-7042178 via skype: hassnainjamil1

Radix Sort - Pseudocode, UML, code, test I/O in Java with complete source code

Domain Description Radix sorting entails grouping number elements in a data structure by each digit. First one groups by 1s; then 10s; then 100s (or the other way around; think little or big endian); and so on. Build a method that effectively models this behavior. You may use the code provided in Lafore, provided you are writing pseudocode, making comments, testing and capturing output and crafting UML. A part of this implementation entails determining the greatest number of digits, to effectively pad smaller elements with zeroes. You may use either an array or a linked structure comprised of nodes. What Will I Submit for Grading? Pseudocode, UML, code, test I/O – copied to one single file – and submitted as pdf and electronically submitted in Canvas Buy now CONTACT DETAILS For any other questions or other tasks please feel free to contact me via email: mhassnainjamil@gmail.com via WhatsApp: +92-324-7042178 via skype: hassnainjamil1

Train Track Allocation and Track Reader program with Test Cases in Java

Buy now Goal:  The goal of this assignment is to gain practical experience with procedural abstraction – how complex functionality can be broken up into different methods and different classes. Problem Overview:  In this assignment, you will continue to implement the component classes of a program for simulating the behaviour of a train management system. Task Overview: In brief, you will write a method for reading in the sections of a track from a file, and you will write a method for allocating routes to trains (so that they don’t collide). If you are a CSSE7023 student you will also be required to write a JUnit4 test suite for testing the track-reading method. More specifically, you must code method read from the TrackReader class and method allocate from the Allocator class that are available in the zip file that accompanies this handout, according to their specifications in those files. If you are a CSSE7023 student, you will also need to complete a systematic and underst...

Hash Map Implementation in Java a university project

Image
Buy now Project:    Complete exercise C-10.40 on p. 454 in the textbook.  Read the problem statement carefully.  The authors initially describe the behavior of the java.util.Hashmap class.  As they describe it, the Java implementation of a Hash Map consists of a table (bucket array) of entries.  Each entry consists of a K, V pair with the addition of a next reference that refers to a next entry in the bucket.  In that way, if collisions have occurred and multiple entries/keys hash to the same bucket, they will be arranged in a singly linked list. Data Structure Classes: Your job is to modify the ChainHashMap class, p. 425 of  the textbook to exhibit the same behavior.  You will be modifying the source code of the author’s classes – so the first step will be to copy those files to your eclipse package.  At a minimum I would recommend these: 1. Map.java 2. AbstractMap.java 3. UnsortedTableMap.java 4. AbstractHashMap.java 5. ChainHashM...

Count number of word from the .txt file in Java full source code

Buy now Task Your task is to write a program, words, that reports information about the number of words read from its standard input. For example, if the file qbf.txt contains the text the quick brown fox jumps over the lazy dog then running the program with is input redirected to come from that file will report 9 words $ words < qbf.txt Total: 9 Automatic Testing This task is available for automatic testing using the name words. You can run the demo using demo words and you can test your work using try words <<filename>>. Background Use the following skeleton for the program: int main (int argc,         char         ** argv                   ) {  enum  {                 total, unique             }             mode = total;             for (int c; (c ...

Program to emulate calculations performed on the HP-35 calculator

Automatic Testing  This task is available for automatic testing using the name hp-35. You can run the demo using demo hp-35 and you can test your work using try hp-35 <filename. Background The HP-35 was the first scientific hand-held calculator, released in 1972 and an immediate success with engineers and scientists. Amongst other features, it used an unusual way of entering numbers, called RPN. RPN (reverse Polish notation, named for Polish mathematician Jan Lukasiewicz) allows complex calculations to be entered without the use of parentheses. The key difference is that operators are entered after the operands, rather than between them The HP-35 implemented RPN using a stack of 4 registers, referred to as X, Y , Z, and T. The value in the X register is the one shown on the calculator's LED display; the other registers are used for temporary values during calculations. New values are entered into the X register, with existing values "pushed" up the register stack: the ...

Representation and manipulation of rational numbers in C++

Requirements Task is to define a class to represent and manipulate rational numbers (fractions), so that by simply changing the type of n1 and n2 to Rational the program will compute fractional arithmetic expressions such as these: 1/2 + 1/3 // answer: 5/6 1/3 - 1/4 // answer: 1/12 2/3 * 4/5 // answer: 8/15 3/7 / 2/3 // answer: 9/14 Download the file fractions_0.zip, which contains the calculator code and a skeleton version of the Rational class. The class defines (but doesn't fully implement) appropriate constructors to initialise instances of Rational, extract and insert operators for input and output of Rational values, and of course arithmetic operators to compute the results. Buy now CONTACT DETAILS For any other questions or other tasks please feel free to contact me via email: mhassnainjamil@gmail.com via WhatsApp: +92-324-7042178 via skype: hassnainjamil1

NP Complete problem and solve it in Map-Reduce and Fan

Requirements Pick any np-complete problem and solve it in Map-Reduce and Fan. Approximate an NP-Complete solver using Map-Reduce and Fan In algorithms. Buy now CONTACT DETAILS For any other questions or other tasks please feel free to contact me via email: mhassnainjamil@gmail.com via WhatsApp: +92-324-7042178 via skype: hassnainjamil1

Food Ordering System project in Java using Queue Data Structure

Image
Explain how the application works  List the modules involved and briefly describe each of the module. [2 marks] Clearly describe the data organisation or storage patterns that influence the selection of specific data structure in that application. Use animations or illustrations in your explanation to improve understanding. [7 marks] Pick any one operation in (2) and present the algorithm Find the running time and estimate the efficiency of the algorithm. Explain the steps that drive you to the final answer. [3 marks] Conclusion on the findings (final answer in (3)) [2 marks] Output Screenshot Buy now CONTACT DETAILS For any other questions or other tasks please feel free to contact me via email: mhassnainjamil@gmail.com via WhatsApp: +92-324-7042178 via skype: hassnainjamil1

QuickHull and divide and conquer algorithm

Requirements: In one place there is a treasure with diamonds. To get someone to treasure should avoid an area with mines. We want to find, from the starting point, the shortest path to reach the treasure and does not pass through the minefield. However, it may go scratch the minefield, practically on the mines around the minefield. The input will be a file in the following form (without the comments): Integer coordinates exept the third line that is a single integer representing the number of diamonds. 8 23 //starting point 130 28//coordinates of the treasure 156 // the number of the diamonds 23 108 // the 1st mine 50 99 // 2nd mine 108 107 // 3rd mine 52 54 115 107 … Write a code such that: Finding the shortest path from the initial point and print the following message. The shortest distance is 122.16872656315464 The shortest path is:(8.0,23.0) -->(56.0,23.0) --> (130.0,28.0) Among the diamonds there is one fake that weighs less than the others (all the other diamonds have exac...

Simple parser-like program for math operations using syntax tree in Java

Requirements: operators supported: ( ) * / + - ^ trigonometric functions: sine, cosine, tangent, cotangent, secant, cosecant variables from set of a - z, A - Z, 0 - 9, and _ of arbitrary length must parse "code-like input" and create tokens from it must build a syntax tree using PEMDAS (http://www.purplemath.com/modules/orderops.htm) order of operations. Feel free to use code from http://castingrays.blogspot.com/2014/10/mathematical-expression-parsing-and.html for reference Ability to store variables, and variables must be usable in equations Numeric values supported is the set of ints and doubles Ability to support user-defined and evaluation of functionsExample: the user inputs “defn square(x) = x * x”square(5) returns 25 Support for basic graphing: e.g. graph( 3 * X ^ 2 + 7)  Support for trigonometric functions (implemented in the code – do not reference trig functions of the standard library). e.g. sin(30) outputs 0.5 Please include meaningful/informative comments Additio...

Simple Trip Planner with file handling in Java complete source - Buy Now

Image
Buy now Simple Trip Planner This assignment is inspired by the problem of planning a European holiday by train, making optimal use of travel time. Your aim is to take each of a number of given train trips, e.g. London to Paris. Your journey must include a number of given trips, but may include additional trips to "link up" the cities in the trips you want to take. For simplicity, we assume that trains run frequently, so that you can focus on scheduling a journey that includes all of your specified trips and minimizes time takes to complete the journey (so you don't have to consider time lost waiting around for departures). The trips in your journey can be scheduled in any order, but your journey always starts in London. The aim is to minimize the total journey time, taking into account travel time and a transfer time in each city (except in London at the start of the journey). We assume that all cities can be reached by train directly from any other city, and that the tra...

Heap Sort and Quick Select Algorithm using array to find the k the maximum

Image
Heap Sort Algorithm to find the kth Maximum Creates an array of random integers of size 1,000,000. Develop the first algorithm to find the Kth largest number from the array (1 <= K <= 1,000,000). The algorithm must be based upon using a heap of size of K. Measure and average the running times of your program. having a base-case such as if (start == end) return A[]; center = (start+ end / 2) use either minHeap or maxHeap for finding the Kth largest number use divide to cut the array and conqueror for example: {2,3,4,8} = quickslecet )A[], start, center) {1,4,6,7} = quickslecet (A[], center+1, end) use conqueror for the for loop for example int i= start, j=center, i<= center && J<=end) Quick Select Algorithm to find the kth Maximum Develop the second algorithm to find the Kth largest number. You need to follow the quickselect algorithm to implement the solution. Measure and average the running times of your program. Deliverables: Source code. Performance analysis docu...

University Case study - design, develop and document a prototype Database system

Image
Buy now University Case study - design, develop and document a prototype Database system prototype Database system Design and implement a database system in Oracle based on the case study below. You will be expected to identify the management needs of the organisation and present how they are solved and dealt with by your database design and implementation. ScenarioLondon University is a prestigious institution educating students from all over the world. It offers 40 programmes from five disciplines. The university currently uses an old legacy system which is file-based. Due to various difficulties, the management has decided to modernise the system by having an online system with a backend database. As a group of consultants, you are required to produce a database system to upgrade a part of the system that handles the student registration and timetabling of students. On arriving at the university each student must be enrolled on a programme and be allocated a personal tutor who would...

Round Robin Algorithm - Distributed Network Architectures & Operating Systems

Buy now I. Assessment Requirements You must work individually on this assessment to develop a load balancer Java application. A report is required which explains what you had to change since assessment 1 and the challenges that you encountered and solved for your project. II. Assessment Scenario/Problem Restating the scenario from Assessment 1:For this assignment, you will be taking your design from assessment 1 and implementing it using Java. Here, your standard or weighted round-robin algorithm will be running on the load balancing machine (i.e. the load balancing program will be working on a single computer) while some client applications will be running on each of the nodes. Your system will need to consider the following functionality and messaging (in no particular order): Standard/weighted round-robin algorithm working on a designated load balancer machine. Each node will register with the server by sending a message. The load balancer will record node details. The notion of a j...

Heap Data Structures full tutorial with source code

Image

Stack Data Structure tutorial

Image

Heap Creation and Sorting in C++ with checks free source code

Image
Heap Data Structure Creation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 # include < iostream > using namespace std ; void heapCreation ( int item ); void heapSorting (); int i , p , n = 0 ; const int heapSize = 100 ; int arr [ heapSize ]; void heapCreation ( int item ){ if ( n >= heapSize ){ cout << "Heap is saturated: Insertion is void" << endl ; return ; } else { int temp ; cout << item << endl ; n = n + 1 ; arr [ n ]= item ; i = n ; p = i / 2 ; while ( p > 0 && arr [ p ]< arr [ i ]){ temp = arr [ i ]; arr [ i ]= arr [ p ]; arr [ p ]= temp ; i = p ; p = p / 2 ; } } } void heapSorting (){ int item , j , temp , lchild , rchild , i = n ; cout <...

Program Development in Java (Software Construction) power point presentations [PPT] free download

Image