angrywaffle
angrywaffle

Reputation: 17

"your interface with the user can be via the command line"

I am new to programming and I am trying to understand what exactly that title means. The class this is for uses java. I feel like the statement "your interface with the user can be via the command line" means don't worry about using a applet or jframe but that is what we are currently learning so not needing either is a surprise to me. I just wanted to look into that some first to make sure my assumption was correct. I did do some searching but did not see the answer I was looking for.

Upvotes: 0

Views: 45

Answers (2)

user unknown
user unknown

Reputation: 36259

Yes, don't underestimate the command line.

In the beginning, it is just less things to know, to get you started. For many things, it's the most effective tool to use.

So you should know your commandline well and keep learning things about it.

To get you started, you have to install java either way, whether you start your programs from the shell or from an IDE. But you don't need to install the IDE.

The settings in the IDE can be distributed over many dialogs. In the shell, you normally see, what the current directory is. You have fast and easy access to all information and can post them without doing screenshots.

You can collect them with a script, while multiple settings from multiple dialogs are harder to collect, especially, if you don't post them as image.

You can easily work with redirections to collect the output of your program:

   java MyClass > result.txt 

You can automate the input:

   echo foo | java MyClass

   cat samplefile | java MyClass 

(on Windows, the cats name is, if I remember correctly, type).

   java MyClass sample1.csv 

   java MyClass 100 

When you know these methods, you can easily combine them and combine your programs with other programs:

   sed -f "filter.sed" data-2017.csv | java Analyzer c | java Visualizer 2> err.log | gnuplot 

And it is much more easy to communicate what you did by copy/pasting a bunch of commands from the shell history, than to explain "then I clicked here, opened the menue there, selected that, hit enter, ..." and easy to reproduce somewhere else.

Upvotes: 0

rohit thomas
rohit thomas

Reputation: 2322

The definition of interface states that
a device or program enabling a user to communicate with a computer.

So from the dawn of computing men/women used to interact with machine using machine language which were in the form of punch cards, so as computing powers grew, there was a need for languages(converting to machine language) and brought the famous command Line/Prompt which you so find it weird (which was a technological revolution at that time) which is turn helped to create languages like FORTRAN,Pascal,C which made life easier.

The command Line created an excellent interface to talk to the computer which is still used by experts by the way :P

Later on as tech grew, people moved on to applets,Jframe,Web to meet the demands of people wanting to see things in different view, but command Line is still very popular as it is needed to run different type operations(starting your system up for example) which you will learn as you grow etc....

enter image description here P.S. its the black screen you see like so

Hope I made sense and please do correct me if I'm wrong :)

Upvotes: 1

Related Questions