Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lab3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
snorre.bue
lab3
Commits
315b276a
Commit
315b276a
authored
1 year ago
by
Villsty
Browse files
Options
Downloads
Patches
Plain Diff
reverted CommandLineInterface.java back to initial state
parent
c7b5bfc7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/no/uib/inf101/terminal/CommandLineInterface.java
+0
-8
0 additions, 8 deletions
...ain/java/no/uib/inf101/terminal/CommandLineInterface.java
src/main/java/no/uib/inf101/terminal/SimpleShell.java
+2
-1
2 additions, 1 deletion
src/main/java/no/uib/inf101/terminal/SimpleShell.java
with
2 additions
and
9 deletions
src/main/java/no/uib/inf101/terminal/CommandLineInterface.java
+
0
−
8
View file @
315b276a
package
no.uib.inf101.terminal
;
// UiB INF101 ShellLab - CommandLineInterface.java
//
// Grensesnittet CommanLineInterface beskriver metoder for input og
// output til et program som virker med et tekstbasert grensesnitt.
// Du trenger ikke gjøre noen endringer i denne filen for denne lab'en.
/**
* A command line interface is a program with a text-based user interface.
* The user can enter keys as input, and the program will respond by giving
...
...
@@ -20,8 +14,6 @@ public interface CommandLineInterface {
*/
void
keyPressed
(
char
key
);
void
KeyPressed
(
char
key
);
/**
* Get the text to display on the screen.
*
...
...
This diff is collapsed.
Click to expand it.
src/main/java/no/uib/inf101/terminal/SimpleShell.java
+
2
−
1
View file @
315b276a
...
...
@@ -18,7 +18,6 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.Objects
;
// TODO 1: Let SimpleShell implement CommandLineInterface
public
class
SimpleShell
implements
CommandLineInterface
{
//////////////////////////////////////////////////////////////////////
...
...
@@ -33,6 +32,8 @@ public class SimpleShell implements CommandLineInterface {
private
final
List
<
String
>
history
=
new
ArrayList
<>();
/** The command currently being typed */
private
String
currentCommand
=
""
;
// TODO 4: Create instance variable storing Command objects
//////////////////////////////////////////////////////////////////////
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment