0% found this document useful (0 votes)
9 views5 pages

Hyperloop Manager Assignment Overview

Uploaded by

Samanyu Arora
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)
9 views5 pages

Hyperloop Manager Assignment Overview

Uploaded by

Samanyu Arora
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

P07 Hyperloop Pair Programming: ALLOWED

CS 300: Programming II – Fall 2024 Due: 10:00 PM CT on THU 11/14

P07 Hyperloop
Overview
Welcome to The Future, where instead of convenient things like accessible public transport and trains,
we have the gig economy… and the Hyperloop. In the Hyperloop you’ll travel in one of a series of linked
pods, which can be first class or economy and maintain a list of passengers (up to a hard limit). For
realism, they also have a (low) probability of catastrophic malfunction!

The Hyperloop Manager you’ll be completing provides the Hyperloop operators with the ability to track
and control the active pods, remove malfunctioning pods, and ensure everything works as well as
possible.

Grading Rubric
5 points Pre-assignment Quiz: accessible through Canvas until 11:59PM on 11/10.

15 points Immediate Automated Tests: accessible by submission to Gradescope. You will


receive feedback from these tests before the submission deadline and may make
changes to your code in order to pass these tests.

Passing all immediate automated tests does not guarantee full credit for the
assignment.

20 points Additional Automated Tests: these will also run on submission to Gradescope, but
you will not receive feedback from these tests until after the submission deadline.

10 points Manual Grading Feedback: TAs or graders will manually review your code, focusing
on algorithms, use of programming constructs, and style/readability.

50 points MAXIMUM TOTAL SCORE

©2024 Blerina Gkotse, Hobbes LeGault, and Rahul Choudhary — University of Wisconsin–Madison
1
P07 Hyperloop Pair Programming: ALLOWED
CS 300: Programming II – Fall 2024 Due: 10:00 PM CT on THU 11/14

Learning Objectives
After completing this assignment, you should be able to:

● Explain how data is stored in a doubly-linked list, including how additional elements are added in
locations other than the head or tail of the list
● Identify how an Abstract Data Type influences the structure of an implementation
● Implement meaningful unit tests to verify the correctness of a data structure

Additional Assignment Requirements and Notes


Keep in mind:

● Pair programming is ALLOWED for this assignment, BUT you must register your partnership
before the autograder is released. If you do not do so, you must complete this assignment
individually or be subject to Academic Misconduct sanctions.

● The ONLY external libraries you may use in your program are:
[Link] - [Link], [Link]
All other classes - only relevant exceptions

● Use of any other packages (outside of [Link]) is NOT permitted.

● You are allowed to define any local variables you may need to implement the methods in this
specification (inside methods). You are NOT allowed to define any additional instance or static
variables or constants beyond those specified in the write-up.

● You are allowed to define additional private helper methods.

● Only LoopStationTester may contain a main method.

● All classes and methods must have their own Javadoc-style method header comments in
accordance with the CS 300 Course Style Guide.

● Any source code provided in this specification may be included verbatim in your program
without attribution.

● All other sources must be cited explicitly in your program comments, in accordance with the
Appropriate Academic Conduct guidelines.

● Any use of ChatGPT or other large language models must be cited AND your submission MUST
include screenshots of your interactions with the tool clearly showing all prompts and
responses in full. Failure to cite or include your logs is considered academic misconduct and will
be handled accordingly.

©2024 Blerina Gkotse, Hobbes LeGault, and Rahul Choudhary — University of Wisconsin–Madison
2
P07 Hyperloop Pair Programming: ALLOWED
CS 300: Programming II – Fall 2024 Due: 10:00 PM CT on THU 11/14
● Run your program locally before you submit to Gradescope. If it doesn’t work on your
computer, it will not work on Gradescope.

Need More Help?


Check out the resources available to CS 300 students here:
[Link]

CS 300 Assignment Requirements


You are responsible for following the requirements listed on both of these pages on all CS 300
assignments, whether you’ve read them recently or not. Take a moment to review them if it’s been a
while:

● Appropriate Academic Conduct, which addresses such questions as:


○ How much can you talk to your classmates?
○ How much can you look up on the internet?
○ How do I cite my sources?
○ and more!

● Course Style Guide, which addresses such questions as:


○ What should my source code look like?
○ How much should I comment?
○ and more!

Getting Started
1. Create a new project in Eclipse, called something like P07 Hyperloop.
a. Ensure this project uses Java 17. Select “JavaSE-17” under “Use an execution
environment JRE” in the New Java Project dialog box.
b. Do not create a project-specific package; use the default package.

2. Download five (5) Java source file(s) from the assignment page on Canvas:
a. [Link] (abstract data type)
b. [Link] (instantiable class)
c. [Link] (instantiable class)
d. [Link] (custom CHECKED exception)
e. [Link] (skeleton code for tester, includes a main method)

3. Create two (2) Java source file(s) within that project’s src folder:
a. [Link] (instantiable, implements ListADT)
b. [Link] (instantiable, manages several Tracks)

©2024 Blerina Gkotse, Hobbes LeGault, and Rahul Choudhary — University of Wisconsin–Madison
3
P07 Hyperloop Pair Programming: ALLOWED
CS 300: Programming II – Fall 2024 Due: 10:00 PM CT on THU 11/14

1. Testing Your Code


The provided LoopStationTester file contains only FOUR tester methods, focused on the high-level
methods in the LoopStation class. LoopStation requires that the methods in Track be working correctly!

● Test as you go, and add private tester methods to your tester class to help ensure that Track is
working as expected. If methods in Track are not correct, LoopStation will not work correctly
either.

● The crux method in this assignment is likely to be the clearMalfunctioning() method in


LoopStation, which will rely heavily on Track’s remove() method. Draw diagrams and ensure
you know how to remove from all possible locations in a doubly-linked list BEFORE you begin
implementing!

● If you haven’t already, consider spending some time learning how to use your IDE’s debugger
tool. It is very helpful for following the execution of your code, especially as we get into more
complex programs. There is a tutorial for Eclipse’s debugger linked on our resources page.

2. Pod objects
The Hyperloop you will be implementing contains a series of Pod objects. We’ve provided these for you
in their entirety, but you might want to add a toString() method to help with debugging. There is no
specified format for this, as it’s not a required method, but you might consider something like the
[Link]() of the passenger list, followed by a * if the Pod is currently not functional.

Note that the Pod object’s isFunctional() accessor method has a 1-in-20 chance of CAUSING the
Pod to malfunction, which in turn will cause every other Pod method to throw an exception. You’re free
to use this method if you like, but be aware that using it may cause other problems that you’ll need to
take into consideration in your tester methods!

It’s very much in your interest to figure out a more creative solution to determining whether a Pod is
currently functional.

3. Track - a doubly-linked list


In class you implemented a singly-linked list. Now you’ll implement a doubly-linked list yourself! This
variety of linked list is composed of nodes which maintain not only a reference to the next element in
the list, but also the previous element, so that you can move through the list in either direction.

NOTE: Track contains three (3) methods NOT defined in ListADT. Don’t forget to implement these!

©2024 Blerina Gkotse, Hobbes LeGault, and Rahul Choudhary — University of Wisconsin–Madison
4
P07 Hyperloop Pair Programming: ALLOWED
CS 300: Programming II – Fall 2024 Due: 10:00 PM CT on THU 11/14

4. LoopStation and management tasks


Once you have a working Track class, move on to the LoopStation and its associated tester methods. This
will maintain a set of three different Tracks and move Pods between them. It will also have the ability to
detect and remove malfunctioning pods.

Remember to protect against exceptions! No exceptions except those EXPLICITLY stated in the Javadocs
should be thrown at any time.

Assignment Submission
Hooray, you’ve finished this CS 300 programming assignment!

Once you’re satisfied with your work, both in terms of adherence to this specification and the academic
conduct and style guide requirements, make a final submission of your source code to Gradescope.

For full credit, please submit ONLY the following files (source code, not .class files):

● [Link]
● [Link]
● [Link]

Additionally, if you used generative AI at any point during your development, you must include
screenshots showing your FULL interaction with the tool(s).

Your score for this assignment will be based on the submission marked “active” prior to the deadline.
You may select which submission to mark active at any time, but by default this will be your most recent
submission.

Students whose final submission (which must pass ALL immediate tests) is made before 5pm on the
Wednesday before the due date will receive an additional 5% bonus toward this assignment.
Submissions made after this time are NOT eligible for this bonus, but you may continue to make
submissions until 10:00PM Central Time on the due date with no penalty.

Copyright notice
This assignment specification is the intellectual property of Blerina Gkotse, Hobbes LeGault, and the
University of Wisconsin–Madison and may not be shared without express, written permission.

Additionally, students are not permitted to share source code for their CS 300 projects on any public site.

©2024 Blerina Gkotse, Hobbes LeGault, and Rahul Choudhary — University of Wisconsin–Madison
5

Common questions

Powered by AI

The Hyperloop system described in the assignment features linked pods that can be categorized into first class or economy, with a hard limit on passenger capacity. These pods have a low probability of catastrophic malfunction, which significantly influences operation as malfunctioning pods must be detected and removed. This requires robust tracking and control mechanisms to ensure functionality and safety. The use of a doubly-linked list to manage the pods allows for efficient addition and removal of pods from any list position, thus enhancing operational efficiency .

The doubly-linked list structure allows for nodes to maintain references to both the next and previous elements, enabling traversal in either direction. This feature is critical for efficiently managing Hyperloop pods as it simplifies the removal of malfunctioning pods from the list without the need to traverse from the beginning. It supports operations like clearMalfunctioning() by allowing elements to be efficiently removed from any location, which is pivotal for system reliability and maintaining an optimal function of the Hyperloop .

Testing the Track class involves ensuring the correct functionality of methods defined in the doubly-linked list implementation and those additional not defined in ListADT. Private tester methods should be used alongside LoopStationTester to verify high-level methods. Tracking and handling of exceptions, especially during malfunctioning pod removals, are critical. It is advisable to draw diagrams to understand node removal thoroughly. Testing should also include use of the IDE's debugger tool for tracking execution and ensuring logical correctness .

Abstract classes and interfaces like ListADT are vital in designing scalable systems as they provide a flexible framework that can accommodate future changes without impacting implementation details. In the Hyperloop project, ListADT sets a foundation for implementing the Track class, allowing for various data structure implementations without modifying client code. This approach enhances scalability, facilitating future extension and modifications in system behavior with minimal disruption, thus accommodating technological advancements or algorithmic changes seamlessly .

The use of Abstract Data Types (ADT) in the Hyperloop simulation influences its implementation by defining specific data structure behaviors while abstracting the concrete implementation details. This abstraction allows developers to focus on interface behavior and method functionalities, while enabling flexibility in implementation. For instance, the ListADT interface ensures that Track implementations adhere to a set protocol, thus maintaining system integrity and facilitating easier debugging and testing through clear contract-based development .

The LoopStationTester should be used to test high-level methods of the LoopStation class while ensuring that private tester methods are added to verify the Track class's functionality. Developers should utilize these tests iteratively during the development process to ensure that all methods work as expected. Time spent learning and utilizing the debugger in the IDE is also highly encouraged. This approach ensures functionality is correct at each step and aids in identifying errors early in the development .

The Course Style Guide plays a crucial role in ensuring consistency, readability, and quality in the code submitted for the Hyperloop programming assignment. It provides clear guidelines for commenting, promoting understandability and maintainability of the code through Javadoc-style method header comments. Adherence to these standards is necessary for achieving full marks in manual grading components, ensuring that code not only functions correctly but also adheres to the course's quality expectations .

Proper exception handling in the LoopStation class is critical as it ensures the robustness and reliability of the Hyperloop system. Malfunctioning pods can throw exceptions that might propagate, disrupting the entire system's operation. By handling exceptions explicitly, as required by the Javadocs, the system can identify and remove malfunctioning pods efficiently without affecting the other pods' functionalities, maintaining system continuity and passenger safety .

The isFunctional() method of the Pod object has a 1-in-20 chance of causing the Pod to malfunction, which could lead to exceptions being thrown during testing. This can complicate testing by introducing randomness and unpredictability in outcomes. To mitigate these issues, the method should be used cautiously within controlled test scenarios. Implementing additional measures such as a deterministic mock function for testing can help simulate different functionalities without relying on chance, ensuring consistent results and effective testing outcomes .

Pair programming for the Hyperloop assignment requires registration of partnerships before the autograder is released. This ensures both accountability and adherence to rules. The guidelines mandate explicit source citation, limitation to specified external libraries, and prohibition against unauthorized variable definitions. These rules promote fair collaboration and academic integrity by preventing plagiarism and enforcing controlled code sharing following the Appropriate Academic Conduct guidelines .

You might also like