CMSC350 Project 3 - The third programming project

Question # 00652601
Subject: Computer Science
Due on: 03/06/2024
Posted On: 03/06/2024 02:20 AM
Tutorials: 1
Rating:
4.9/5
Question Dot Image

CMSC 350 Project 3

The third programming project involves writing a program that performs a sort by using a binary search tree. The program should be able to sort lists of integers or lists of fractions in either ascending or descending order. One set of radio buttons should be used to determine whether the lists contain integers or fractions and a second set should be used to specify the sort order. The main class should create the GUI shown below:

The GUI must be generated by code that you write. You may not use a drag-and-drop GUI generator.

Pressing the Perform Sort button should cause all the numbers in the original list to be added to a binary search tree. Then an inorder traversal of the tree should be performed to generate the list in sorted order and that list should then be displayed in the sorted list text field.

In addition to the main class that defines the GUI, you should have a generic class for the binary search tree. That class needs a method to initialize the tree, one that allows a new value to be inserted in the tree and one that performs an inorder tree traversal that generates and returns a string that contains the tree elements in sorted order. The insert method does not need to rebalance the tree if it becomes unbalanced. It should allow duplicate entries and it must be written using recursion. It is not necessary to have a method to delete a node from the tree nor one to check whether a particular value is in the tree.

The third class required for this project is one that defines fractions. It should have a constructor that accepts a string representation of a fraction and a toString method. It must implement theComparable interface, which means a compareTo method is also required.

A second example of a run of this program is shown below that sorts fractions in descending order:

1

Note that fractions are to be written with a slash separating the numerator and denominator with no spaces on either side of the slash.

The only error checking required of this program is to check for nonnumeric input which includes improperly formatted fractions such as 3/4/8. Such malformed fractions should cause a NumberFormatExpression to be thrown. The main class must catch these exceptions and display an appropriate error message as shown below:

You are to submit two files.

1. The first is a .zip file that contains all the source code for the project, which includes any code that was provided. The .zip file should contain only source code and nothing else, which means only the .java files. If you elect to use a package the .java files should be in a folder whose name is the package name.

2

2. The second is a Word document (PDF or RTF is also acceptable) that contains the documentation for the project, which should include the following:

  1. A UML class diagram that includes all classes you wrote. Do not include predefined classes. You need only include the class name for each individual class, not the variables or methods
  2. A test plan that includes test cases that you have created indicating what aspects of the program each one is testing
  3. A short paragraph on lessons learned from the project
Dot Image
Getsolution Posted By :
Questions: 15512 Tutorials: 15511
Tutorials for this Question

CMSC350 Project 3 - The third programming project

Tutorial # 00651500
Posted On: 03/06/2024 02:21 AM
Feedback Score: Not rated yet!
Purchased By: 2
Getsolution
Posted By:
Questions:
15512
Tutorials:
15511
Report this Tutorial as Inappropriate
Tutorial Preview
The solution of CMSC350 Project 3 - The third programming project...
Attachments
CMSC350_Project_3_-_The_third_programming_project.ZIP (18.96 KB)

Great! We have found the solution of this question!

Related Questions
Examine the several different types of data insights that occur
Question Examine the several different types of data insights that occur in big data analytics:  ? Offer novel knowledge  ? Provide causation relationships  ? Add a competit …
Computer science - Is virtualisation cost effective
Computer science question Is virtualisation cost effective and does it support green IT? Contents Introduction Is Virtualisation cost effective? Running out of space? Needing Virtualisa …
Studying Computing involves developing both subject
Studying Computing involves developing both subject-specific and transferable skills. Describe the skills you have used prior to university, and discuss how you would expect those skills to develop wh …
Computer Science - Discuss the critical characteristics
Computer Science Question Assignment 1 - Question 1: Discuss the critical characteristics of communication channels in data communications. Explain how bandwidth and communication medium affe …
List and explain two browser add-ons(plug-ins)that improve the security
1- List and explain two browser add-ons(plug-ins)that improve the security of a user’s browser. Why are these features not built-into the browser? 2- What are two security risks associated wi …
How are browsers being used to mine crypto currency
Part A: How are browsers being used to mine crypto currency? (1 pt) Find an example of malvertising. Provide a screen shot of the malvertising. (2 pts) Provide the details on how and where you …
What are the seven categories of cybersecurity functions in the NICE
security awareness What are the seven categories of cybersecurity functions in the NICE Cybersecurity Workforce Framework (https://www.nist.gov/itl/applied-cybersecurity/nice/resources/nice-cybe …
The Computer Mouse - Once a nondescript box perched on a large
The Computer Mouse Once a nondescript box perched on a large ball bearing, today the computer mouse comes in a wide range of shapes with a variety of capabilities. There are cordless mice, ergonomi …
CMSC350 Program that accepts an arithmetic expression
CMSC350 Program that accepts an arithmetic expression The second programming project involves writing a program that accepts an arithmetic expression of unsigned integers in postfix notation and bu …
Week 6 Discussions - Local Security Good Practices
Week 6 Discussions Please respond to at least two main topics  1. Local Security Good Practices Discuss in detail several effective local security practices to harden your Linux distribu …
Recent Questions
NCU MSW6105 All Assignments Latest 2024
MSW6105 Forensic Clinical Social Work Practice Week 1 Assignment : Explain the Field of Forensic Social Work Instructions For this first assignment, create a hypothetical blog post that in …
NCU MSW6105 Week 8 Assignment Latest 2024
MSW6105 Forensic Clinical Social Work Practice Week 8 Signature Assignment : Create a Workshop for Probations Officers on How Social Work is Applied to Those Systems For your final assignment …
NCU MSW6105 Week 7 Assignment Latest 2024
MSW6105 Forensic Clinical Social Work Practice Week 7 Assignment : Recommend Resources for Refugees The dimensions of diversity are understood as the intersectionality of multiple factors inc …
NCU MSW6105 Week 6 Assignment Latest 2024
MSW6105 Forensic Clinical Social Work Practice Week 6 Assignment : Critique Rehabilitation Efforts Social workers understand the forms and mechanisms of oppression and discrimination and …
NCU MSW6105 Week 5 Assignment Latest 2024
MSW6105 Forensic Clinical Social Work Practice Week 5 Assignment : Critique Factors Related to Drug Use Social workers understand how diversity and difference characterize and shape the human …
NCU MSW6105 Week 4 Assignment Latest 2024
MSW6105 Forensic Clinical Social Work Practice Week 4 Assignment : Evaluate the Importance of Cultural Proficiency Social workers understand that every person regardless of position in societ …
NCU MSW6105 Week 3 Assignment Latest 2024
MSW6105 Forensic Clinical Social Work Practice Week 3 Assignment : Explain Factors of Vulnerability for Substance Abuse Instructions Social workers understand that assessment is an ongoing …
NCU MSW6105 Week 2 Assignment Latest 2024
MSW6105 Forensic Clinical Social Work Practice Week 2 Assignment : Assess Effective Skills and Practices for Successful Forensic Social Work Instructions Social workers understand the hist …
NCU MSW6105 Week 1 Assignment Latest 2024
MSW6105 Forensic Clinical Social Work Practice Week 1 Assignment : Explain the Field of Forensic Social Work Instructions For this first assignment, create a hypothetical blog post that in …
Walden HLTH6475 Complete Course Latest 2024
HLTH6475 Prgm Plan, Implement & Eval Module 1 Discussion INDIVIDUAL RESPONSIBILITY VERSUS VICTIM BLAMING IN HEALTH PROMOTION Part of what makes a discussion a discussion and not a lectur …