Where is the error in this code sequence?

Assignment Help C/C++ Programming
Reference no: EM13936573

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
Explain what the problems are and how to fix them.

Reference no: EM13936573

Questions Cloud

Discuss the various sources of human stem cells : What are the impacts on ecosystems and issues with introduced, invasive and genetically-modified (GMO) organisms? Select one plant and one animal species to illustrate your points.
What does it mean to develop an assessment plan : What does it mean to develop an assessment plan? How does an assessment plan differ from a treatment plan
Focus on paramtized queries and stored procedure : The testing phase will include creating a simple page of login as password with simple code and show that the sql injections occurs (show codes and snapshots where necessary)
Write a business memo to the head of the company : Write a business memo to the head of the company stating why his proposed actions (of buying the company) might not be a good idea based upon the sales information you reviewed.
Where is the error in this code sequence? : Where is the error in this code sequence?Explain what the problems are and how to fix them.
Prepare presentation on motivational interviewing : Create an 8- to 16-slide Microsoft PowerPoint presentation on motivational interviewing. Include the following:  The agency's philosophy of motivational interviewing and The agency's ethical beliefs, including confidentiality
Explain the infective stages of animal parasites : Explain the infective stages of animal parasites (cestodes, protozoa, nematodes) and how they respond in environmental conditions, such as temperature, drying, and lack of a susceptible host?
Determine how many consonants are in an entered string : Write a program that determines how many consonants are in an entered string of 50 characters or less. Output the entered string and the number of consonants in the string.
Make it on platform research on hypervisors : Assignment is done already but the proposal is for a hypervisor - ie: Hyper-V, VMWare, FreeBSD Jail, etc... Which has been done but there is no supporting evidence for that platform.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Implement uniform random number generator

Implement Uniform Random Number generator and Generate 1000 Random number between 0 an 10000.

  Annotated bibliography on the value of educational games

How to do a Annotated Bibliography on the value of educational games

  Implement a program to process a weighted undirected graph

Read in the number of vertices V and the number of edges E of the graph followed by its E edges, each in the form u, v, w where 1 0 representing an edge uv with weight w.

  Define a class that consists of three objects

Define a class that consists of three objects: day, month, and year. Within this class define two member function (constructor ) to initialize the objects to today?s date and one that display the date as follows: 05/7/2002

  Basic game of battleship

Basic Game of Battleship - Analyze a basic set of requirements and apply top-down design principles for a problem and eliminate redundancy within a program by applying loops and functions

  Coinflip to prompt for and input a number

Write a program and name it CoinFlip to prompt for and input a number of times to flip a coin, then to output the number of "heads" and the number of "tails" that were flipped.

  Program to generate a star-based histogram for a quiz

Write a C++ program to generate a star-based histogram for a quiz (maximum score possible is 5) given to a class of N students, where N is an input from the user. Use arrays for computation.

  Create a simple text editor that has one large rich text box

Complete the following programming exercise (SIMPLE TEXT EDITOR WITH ONE LARGE RICH TEXT BOX). You will use the OpenFileDialog, StreamReader and StreamWriter objects; the Close, Peek, ReadLine, ShowDialog and WriteLine methods.

  What is an abstract base class

What is a pure virtual function. Why would you define a pure virtual function. Give an example of a pure virtual function. What is an abstract base class. What does it do. Why would you make a class abstract

  Write an iterative function power

Write an iterative function power1 to compute xn for n >= 0 and write a recursive function power2 to compute xn by using the following recursive formulation

  Create a calling module name and parameters

Create a calling module name and parameters for the following. (Remember that the asterisk before the parameter name indicates a call-by-reference parameter.

  Conditional jump statements causes a jump to dest

Determine whether each of the conditional jump statements causes a jump to dest.

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