Finding error in code sequence

Assignment Help Software Engineering
Reference no: EM1378927

This code prints all elements of the array geo for ( int i = 0; i < geo.length; i++ )
{
//the code is missing here

}
________
Where is the error in this code sequence?
// a is an ArrayList of strings
// a has already been declared and instantiated
a.size ( ) = 10;
__

You coded the following in the Test.java class:
public static void main (string) [ ] args)
{
// cars is an ArrayList of Auto Objects
// cars has already been declared and instantiated
for ( Auto a ; cars ) // line 12
{
System.out.println (a. to string ( ) );
} // line 15
} //line 16
When you compile, you get the following message:
Test.java:12 '; 'expected
for ( Auto a ; cars ) // line 12
^
1 error
Describe what the problems are and how to fix them.

Reference no: EM1378927

Questions Cloud

Microsoft word and powerpoint presentation : Assume A friend of you has just started using M.S. Word, and has e-mailed you requesting instructions on how to apply a first line indent to a paragraph. Construct a list of instructions about how to configure a 1st line indent for a paragraph.
Finding output of the code sequence : Construct the pseudocode for a program that finds the sums of the numbers input that are greater than or equal to 10 and the numbers input that are less than ten.
Program to calculate the average salary and years employed : Construct a program that determines how many consonants are in an entered string of fifty characters or less. Output the entered string and the number of consonants in the string.
Explanations on fixing c++ code errors : This technique takes an array of ints as a parameter and returns an array of Booleans. For each element in the parameter array whose value is 0,
Finding error in code sequence : This code prints all elements of the array geo for, Describe what the problems are and how to fix them.
Explain and fix java code errors : The code compiles properly, but when you run, you get the following output, Exception in thread "main" java.land.IndexoutBoundsException:
Fixing errors for java code : The code compiles properly and runs, but result is not what you expected; output is similar to the following, Describe what the problem is how to fix it.
Programming frameworks besides asp.net : Name three other web programming frameworks besides ASP.NET. Explain the ways that ASP.NET is different than other web programming frameworks.
Effect of the time step on stability and accuracy : For each case of each method, plot the velocity profile for four difference times on the same graph - Write a code to solve this problem for the schemes and conditions.

Reviews

Write a Review

Software Engineering Questions & Answers

  Sketch entity-relationship diagram of database table

Convert table to 3NF. Represent your answer in DBDL. Give table name and fields. Underline primary key. Sketch entity-relationship diagram showing all relationships.

  Write down main ideas behind relational model

Write down the main ideas behind relational model? Why are they an improvement over what came before? In what ways is the relational model restrictive?

  Build an entity relationship diagram for hospital

Build an Entity Relationship Diagram(ERD) for the following hospital scenario. For your Patient entity show its attributes . Highlight the key attribute in red.

  Concepts of software engineering

Explain the software measurement process and state how to implement the software measurement?  List the challenges and difficulties of applying the software metrics?

  Process of modeling using entity-relationship diagrams

Process of starting with world objects and modeling by using entity-relationship diagrams is referred to as top-down process.

  End users must be involved in database design in a limit

End users must be involved in database design, but only to  degree. What are you are your toughts do you agree or did agree why or why not.

  Differentiate between alpa and beta testing

Differentiate between alpa and beta testing, Consider a piece of an embedded software that is a part of a T.V. Which of the types of system testing would you choose to apply and at what time?

  Draw erd to show attributes of student

Draw and ERD for this situation. What attribute or attributes did you designate as the identifier for the STUDENT entity? Why?

  Create data flow diagram about process

Create a data flow diagram about the process. When John received orders from the sales department, he would pick the items from the warehouse to fill up the order.

  Draw pattern activity for adapter and data access object

Draw Pattern Activity: Create a 2-3 page paper comparing and contrasting five of design patterns. Select any five from the list.

  List diffent entities or objects and logical processes

List the diffent entities or objects,logical processes,data flows, and dfata stores that are involoved. starting from the time you submitted your time sheet.

  Create visual logic flow chart-calculate pay of employees

The user will then be able to continue calculating the pay for additional employees until the user decides to stop or until the maximum number of employees is reached. Create a Visual Logic Flow Chart.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd