Write main method to demonstrate the correct working of each

Assignment Help Python Programming
Reference no: EM132322534

Assignment

1. Write separate programs for the following exercises in Java, Python, or C#. Each file should have your name at the top in comment, with short description of what is implemented in that file. Make sure your files have appropriate names as indicated in each exercise. Programs should write output to the Console and have hard coded input in main.

Note 1: If a program is not in approved programming language (or in different language than previous assignment) or has any syntax error, no points will be awarded for that exercise

Note 2: Submitting wrong files or in the wrong format or corrupted files will not be accepted nor will any re-submission be allowed for any such mistake. It is your responsibility to submit the correct files.

a) DLinkedListADT: Implement doubly linked list ADT using the pseudo code covered in class. The data-type that the ADT should store should be a Student object with the following attributes/members: name (string), id (integer), grade (character). You must have all the operations in the pseudo code with the SAME naming convention and statements. The operations printNextList and printPrevList should only print the student's name.

Any operation that is implemented differently from the one given, will not earn credit. Write test program with main method creating an instance of the DLinkedListADT and calling all the operations to demonstrate they work correctly. You must implement a class called DLinkedListADT for the ADT implementation in one file and a separate TestDLinkedList class for the test in a different file. You also need a third file with an implementation of Student class.

b) ConvertToArray: Implement a method that takes DLinkedListADT instance. The method then allocates an array students[] and copies all elements over from the list to the array. The method prints each element's data on separate line and returns the array to the
caller. The method must check if the list is null/None or empty and throw an exception if it is. Analyze time/space complexity of the method. Write a main method to test the code.

c) ListInsert: Add new linked list operation to DLinkedListADT. The operation is called insertBefore and takes two parameters:  insertBefore(String name, Student student).

Then it finds the first node in the list that matches the name and inserts a new node with student value as the previous node in the list. If the list is null it just adds the new Node and if the name is not found in the list it throws an exception with message that the value is not found. Add test cases to TestDLinkedList class from exercise (a) to demonstrate the code works. Analyze time/space complexity of the new operation.

For example:

Given linked list with student elements that have the following name order {"Joe", "Jane", "John"} when we call insertBefore ("Jane", student) where the student has the values {"Beth", 12345, ‘A'} the updated list will have node elements in the following name order: {"Joe", "Beth", "Jane", "John"}

d) QueueADT: Implement Queue ADT using the DLinkedListADT from previous exercise to store Student objects as elements and to include operations:

QueueADT(int min)

boolean isEmpty()

boolean isFull()

void enQueue(Student item)

Student deQueue()

int size()

You must use the QueueADT pseudo code covered in class and use the given operation names and implementation. You cannot not have any other operations. Write test program with main method to demonstrate the correct working of each operation (use double values for your test data). You must implement a class called QueueADT and separate TestQueue class each in a separate file.

e) StackADT: Implement StackADT using the DLinkedListADT from previous exercise to store Student objects as elements and to include operations:

StackADT(int min)

boolean isEmpty()

boolean isFull()

void push(Student item)

Student pop()

int size()

You must use the pseudo code covered in class and use the given operation names and implementation. You should not have any other operations. Write main method to demonstrate the correct working of each operation in a separate test program (use double values for your test data). You must implement a class called StackADT and TestStack class in a separate file.

f) Stack1: A letter means doing a push operation and an asterisk means doing a pop operation n the below sequence. Give the sequence of letters which are returned by the pop operations when this sequence of operations is performed on an initially empty stack.

AB*CE**F**GH*I**

g) Stack2: Given an empty stack in which the values A, B, C, D, E are pushed on the stack in that order but can be popped at any time, give a sequence of push and pop operations which results in pop()ed order of CEDBFA 2.

Record a video(s) 10-20min long explaining the implementation and solution of each of the above programs to include showing the running program and output. You may have two separate videos if you need more time to explain all exercises. DO NOT create separate videos for each exercise!!!

Attachment:- pseudo code.rar

Reference no: EM132322534

Questions Cloud

Make presentation about third-party logistics provider : Research any Canadian 3PL (third-party logistics provider) and prepare to make a 5-minute presentation about that organization to the class
How influenced do you consider yourself to be : How influenced do you consider yourself to be when it comes to strategic product brand messages? Does your use of social media shape your purchasing decisions?
How does a team supervisor select a strategy : Given that most teams will have a mixture of the two types, which suggestion for for inter-team conflict resolution do you think is the best and why?
Discuss what fraud detection techniques could have used : Find a court case where fraud occurred involving either a cash receipts or cash disbursement scheme (using the KU library/Westlaw).
Write main method to demonstrate the correct working of each : Write separate programs for the following exercises in Java, Python, or C#. Each file should have your name at the top in comment.
Explain what products or services it provides : You have learned that some markets are competitive but that there are also a few markets that are serviced by just one firm. Examples include utility companies.
Discuss the strategic importance of layout decisions : MGT 655 Discussion Assignment - Discuss the strategic importance of layout decisions. How can a particular layout affect a company's strategic goals
Summarize key points and post in the discussions area : Go to the internet and find a news article published within the last three months that discusses perfect competition, summarize key points and post.
Fisherman in new brunswick : Mr. Jones is a snow crab fisherman in New Brunswick and agreed to sell his boat and license to Mr. Doucette - a fisherman resident in PEI.

Reviews

len2322534

6/14/2019 10:16:50 PM

Correctly implements DLinkedListADT class and its operations using pseudo code covered in class to include naming convention and the statements with data-type as Student object Correctly implements the test program TestDLinkedList which calls all operations in separate file to demonstrate correctness of the code Video correctly explains the ADT and test implementation, and shows and explains running program and output

Write a Review

Python Programming Questions & Answers

  Data wrangling - child mortality

ICT702 - Data Wrangling - Child Mortality - Develop creative approaches to solving the wrangling/analysis problems - Write programs that produce correct

  Write an expression that concatenates the string

Write an expression that concatenates the String variable suffix onto the end of the String variable prefix .

  Write a program that asks for the users age

Write a program that asks for the user's age. Based on their response print "You can vote" (18 years old or older) or "You can't vote" and also whether or not he/she is a senior citizen (over 64). If senior citizen print "You're a Senior Citizen.

  Write a program using the following python functions

You are required to write the following Python functions. Make sure you understand where each function fits into the system described above.

  Build a menu-driven application

Build a menu-driven application that will allow a user to maintain their collections. For example, I might have a coin collection, or a record collection, or a collection of all my valuable items.

  What other factors might be at work

Some well-educated young adults day they are dissatisfied with their denomination's conservative stance on homosexuality. What other factors might be at work?

  Output a brief description of the game of hangman

Output the appropriate number of dashes and spaces to represent the phrase. Dashes are placeholders for letters.

  Write a program using the requetinteger function

write a program using the 'requetInteger' function that will ask the user to type a value that will draw a line from one point on a picture to another.

  Write a function to evaluate returns the area

Write a function called area_triangle() that takes the height and width of a triangle and returns the area

  Plot the bar chart of a dataset

MA1008 Introduction to Computation Thinking - Compose the chart from basic graphic elements like points, lines and texts using functions in Turtle

  Write a python program that will ask the user for a string

Write a Python program that will ask the user for a string and then use the number of characters in the string to print out whether that value is odd or even.

  Build a python application to recommend Training modules

The project is to build a python application to recommend Training modules based on skill proficiency, current project/job skills

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd