Tags:
tag this topic
create new tag
view all tags
---+ Linked List: Spring 2024 ---++ Learning Objective(s) 1 Learn to implement and use linked lists ---++ Overview of the Program This lab will help with the final lab. You are to write a program to build and maintain a "worm" via a linked list. A worm is made up of segments. Each segment has an address (row and column) and must be in a row/column with the segment before it and in a row/column in with the segment after it.<br><br> We will use the direction keys associated with vi to move the worm. <b>h</b> is for left, <b>j</b> is for down, <b>k</b> is for up, and <b>l</b> is for right. There are also four other "commands": <b>+</b> to add a segment on at the end of the worm, <b>-</b> to delete the first segment of the worm, <b>=</b> to display the worm, and <b>q</b> to quit. ---++ Specifics * This program is to be solely text based (for now). * The worm starts out with 6 segments with the head at (10, 10) and the segment in a column below it. * The worm is allowed to move anywhere (there is no "limit" to what the row or column can be). * A worm also has a color that should be gotten from the user when it is first created * The main method should be found in a program called *WormDriver* * The input should be via command line argument . * You must use a linked list. * You should have the following classes: * Worm * Segment * Lnode * !LinkedList. This can be any of the four types of linked lists we covered in class. You are allowed to maintain a direct link to the last item in the list. * The design (UML and testing plan) should be done before starting to code. However, this is a one week lab and you will only be turning in the solution (the pdf and the software) * create a zip folder containing only the following (and submit it) * only one file (as a pdf) with the completed software development report * all the .java files needed to run the program * any input files you might want to have the grader use when running the program ---++ Optional improvements None this week.
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 2024-03-06
-
CathyBareiss
Home
Site map
Assessment web
BethelAIResources2026 web
CenterForComputing web
ChatGPT web
Intro2AIatBethel web
Main web
Sandbox web
TWiki web
CenterForComputing Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
E
dit
A
ttach
Copyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback