Introduction to Java Programming - CHALLENGE 1.1: Learning to Code

¡Supera tus tareas y exámenes ahora con Quizwiz!

What is an example of a string?

"Hello World" Can be identified within the enclosed double quotation marks

What is Java's trademark?

"Write once, run anywhere" This means that Java program can be run without changes on different kinds of computers.

What are the three main types of operations that are executed in any program?

Input, Processing, Output

What is a text editor that has additional functionality to allow developers to perform some addition tasks to simplify the workflow of the development process?

Integrated Development Environment (IDE)

What does interpreted programming language do?

Interpreter reads the text instructions and carries them out. The interpreter has to be installed on the computer. One advantage of using an interpreted language is that it can be run on any computer. Although there are those differences in how compilers and interpreters function, the core purpose is the same with interpreters having an added step.

What are the grammar rules of Java referred to as?

Syntax Each programming language (like Python) has its own syntax

What is an error that breaks one of Java's syntax rules and is detectable by the Java Compiler?

Syntax Error

What is a method that allows Java to output content to the console(screen)?

System.out.println()

What is Syntax?

The "grammar" rules of the programming language. Each programming language has its own syntax

What are the first steps into solving a problem?

Think about the goal or purpose of the program, and what users should be able to to expect when they run it. The steps should make sense to the user

What is an example of Interpreted language?

Think back to your recipe written in a different language. Another option would be to invite your fluent friend over to interpret the recipe for you, step-by-step, as you make it. This example is similar to an interpreted programming language. Your fluent friend is the interpreter that converts the instructions for you, allowing you to follow along. In this scenario, you'd need your friend to sit with you again the next time you want to make the recipe because you can't read it without their help.

What is a real life example of Java programming language?

Think back to your recipe written in a different language. Let's imagine you sent your recipe off to your friend to translate it for you. They translated it first, but then they also brought it over to your place and used it to interpret for you, step-by-step, as you prepare the dish. This example is similar to a combination of a compiled and interpreted programming language. Your fluent friend translated the recipe for you first, then they were also gracious enough to stop over and interpret the instructions for you, allowing you to follow along.

What is an example of concatenate?

To concatenate 1234 and 5678, it would result 12345678 To concatenate the words "snow" and "ball", it would result "snowball"

What is the "//" (double slash) symbols used for?

Used in Java to identify a comment. Commented lines are ignored by the compiler and do not affect the behavior of the code. They are also hidden from the user when the program is run.

What is one of the basic units of data, like a number or string, that a program manipulates?

Value It can be simple as a letter or a number

What is the term defined as a name that is used for a location in memory that can store a certain type of value? It can hold various distinct values, at different points in time as the program runs

Variable

What is a software program that behaves like a completely separate computer within an application?

Virtual Machine

What does Processing mean in programming?

When it comes to processing data, there can be many different steps that are performed on the data. It could ne storing them, using them for calculations, validating the data, or sorting the data. -Type of operation used to perform tasks on data including calculations

What does Output mean in programming?

After the data has been processed, output is sent to the monitor, printer, email, file, report, or other means where individuals can view the resulting data. The goal of most programs is to take the raw data or input. process it into information that can be useful, and then output it to the user. -The results at the end of a program based on user input and system processing.

What is a logical step-by-step plan that we need to build for solving a problem?

Algorithm

What is Bytecode

An intermediary step for code conversion between the programming language that you write and the machine code that a computer uses.

What is Interpreted Programming Language?

Another program, called the interpreter, is necessary to help the computer read and execute the program.

What is the middle pane in Replit?

Code Editor Displays the code editor tab. Java code is written and edited tab.

What is a set of instructions that directs the computer's behavior?

Computer Program

What does it mean to combine words or numbers?

Concatenate

How do you research error messages in coding?

Copying and pasting the error into the search browser

What is the value you are testing is in between two edge cases?

Corner Cases

Java is a secure language.

Designed to be used on networks, Java contains features that protect against untrusted code - code that might introduce a virus or corrupt your system in some way

What is a high-level process developers use for planning, creating, testing, and deploying an application?

Development Life Cycle

What are the main tools for Repl?

Docs -This feature opens a documentation tab on the right-hand side of the workspace. You will find helpful guides and videos here. Deployments -Create a production build of your project so people can use it without being interrupted by changes in progress Git (Version Control) -Not needed right now but if there is a need to track changes and roll back to prior versions (similar to Track Changes in MS Word). Debugger -Very helpful to create breakpoints in the code. It also allows users to step through the code one line at a time. Console -The console shows the output of the Repl if you run it. Packages -These packages allow the import of code and functionality that hasn't been built but could be added to the program. For example, when building an image gallery and there is a need to create an image carousel that rotates, a package can be imported that already has that feature which will make it much easier to build and implement. Note that Replit packages are not the same thing as Java packages. Secrets (Environmental Variables) -Variables can be stored in a manner that's hidden away from everyone else but still makes use of them in the Replit. Using this feature will allow you to hide secret information like passwords while still being able to use them in the Repl. Settings -This feature can be very useful as it allows customization of the layout, color scheme, font size, and other features. Database -This feature allows quick database key commands. Unit Tests -This feature allows you to run tests.

What are the values that are at the end of a testing range?

Edge Cases

What is Java initially used for?

Embedding programs into electronic consumer devices, such as microwave ovens and home security systems

What is a series of characters that are combined together?

Literal string

What is an error that the computer can't catch based only on syntax?

Logic errors, or semantic errors

Designing Java to be robust.

Meaning that errors in Java programs don't cause system crashes as often as errors in other programming languages. Certain features of the language enable many potential errors to be detected before a program is run

Developing Java with distributed language

Means that its programs can be designed to run on computer networks. In addition to the language itself, Java comes with an extensive collection of code libraries—software that has been designed to be used directly for particular types of applications—that make it particularly easy to build software systems for the Internet. This is one of the reasons why Java is so well-suited for supporting applications on corporate networks.

What is a particular way of organizing programs by dividing them that encapsulates the program's data and operations?

Object Object-oriented programming languages

What is the right pane in Replit?

Output Sandbox -The console tab and the shell tab are displayed by default. This is the section where code is run and the output is presented.

What are English-like statements that describe the steps in the process?

Pseudocode

What is a computer language that is interpreted rather than compiled?

Python

What are needed around the literal string?

Quotes If they are not around the literal string, Java would assume that it is a variable or another keyword.

What is the IDE for Java?

Replit It is a tool that is completely run through a browser. This means it can be used from any computer, tablet, or mobile device to write, build, and run code.

What is compiler?

Software that translates source program (similar to English) into a language that the computer can understand

What is a data type that can store a literal string as a value?

String

Who initially designed Java?

Sun Microsystems in 1991

What are the criteria in writing algorithms?

1.) Determine what inputs are involved in solving the problem and where they are coming from. This should provide a starting point to establishing the problem. 2.) Determine what the outputs of the problem should be. More than just the individual items that we output, the focus should be on the end result that the program is designed to achieve. This focus could be a single line of output on the screen, a file, an email, or a whole report that is to be generated. 3.) Determine what the order of the steps in the process should be. The order, as discussed, is important because it helps define the actions that need to occur in the order they need to occur. 4.) Determine what types of decisions need to be made within the program. Think back to the prior tutorial. Sophie needed to bring different items depending on the day and the weather forecast. These types of decisions add a layer of choice and options in the process based on the input and other variables. 5.) Consider if there are any parts of the problem that need to be, or could be, repeated.

What are the 7 steps of Development Life Cycle

1.) Determining what the problem being asked is 2.) Plan out the logic for the problem by breaking it down into a sequence of steps or algorithm. 3.) Write the code to perform the algorithm. 4.) Compile/translate the code to a format the computer can read. 5.) Test the program to ensure there are no syntax or logical errors. 6.) Deploy the program to be used. 7.) Support the maintenance of the program.

What is an example of an integer?

2

Why is Java platform independent?

A Java program can be run on virtually any computer system platform including MacOS and Windows. A platform, in this context, is just a particular kind of computer system, such as a MacOS or Windows system.

What is a name for the variable? A continuous sequence of characters without spaces. There can never be a space in a variable name. Consists of upper- and lowercase letter, digits, or underscores "_". The first character must be a letter or an underscore. They are always case sensitive.

Identifier

What is an example of a syntax error?

If the error would be similar to English Program that said, "The ct and mouse were friends." This would result in an error since "ct" is not a word in English.

What is an example of Logic errors?

If the program was meant to give everyone a 10% discount on their orders, but it was accidentally coded to give everyone a 100% discount, that wouldn't be caught by the compiler and would be a logical error. In order to find these errors, you will have to test the code and compare the results with the expected values.

Example of compiled programming

Imagine you found a great new recipe, but it's written in another language. You could send the recipe off to a friend that is fluent in the language and ask them to translate it for you. When they send the translated recipe back, you can easily read it in your own language. This example is similar to a compiled programming language. You can read the recipe because your friend converted the language for you, and you can make the recipe again anytime you'd like because you have a translated version.

What is important when designing an Algorithm?

It is important to think about the bigger picture of an algorithm before writing it. It should be written with the final goal in mind of solving the problem. It is important to consider different ways to solve a problem. This will help determine the best way to solve that problem. As you become more comfortable with a programming language, you will discover better ways to optimize a solution.

Why is Java a good computer language to learn?

It is widely used, high level, general purpose programming language. It can be used to develop a wide range of programs from desktop programs to mobile and distributed applications. Java is also a cross-platform language. Thanks to Java Virtual Machine(JVM), Java allows development and compiling on one platform for deployment on all platforms on which Java is supported.

What programming language has both characteristics of a compiled and interpreted language?

Java It must be compiled first, then it can be interpreted. The Java compiler (JAVAC) is part of the Java Development Kit (JDK). When compiling a program, the compiler takes the human-readable code that we write (in text files with the extension of .java) and translate it to bytecode (in binary .class files) that can be executed by the Java Virtual Machine (JVM). The bytecode differs from machine code because the bytecode is a low-level set of instructions that can be run on the abstract Java Virtual Machine (JVM) instead of directly on specific hardware.

What are the prewritten code collections that you can use when developing a program?

Library/Libraries

What is compiled programming language?

The computer is able to translate the program directly into machine language.

What is Machine Code that is also known as Machine Language?

The computer uses 0s and 1s to perform task. also known as machine language, that can be executed by the computer's processor.

What does it mean to input in programming?

The input to the program allows data to be entered in through a variety of ways, including by you through the keyboard and mouse. It could also be from files on the computer, other hardware devices, images, sounds, or many other potential options. The input from these sources is stored an placed into the memory of the computer and can include all types of data that include text and numeric values. -Type of operation used to allow data to be entered through keyboard or files to a program.

What sometimes show up on the code to flag syntax errors?

red squiggly line under the code


Conjuntos de estudio relacionados

Chapter 4 Quiz - Macroeconomics NIVIN

View Set

Integumentary System (Mastering A&P)

View Set

Chapter 13: The Impending Crisis

View Set

Uppers, Downers, and all Arounders (Biomedical Pharmacology EX 2)

View Set