Friday
May 24, 2013

Homework Help: Programming

Posted by Natalie on Monday, November 9, 2009 at 8:51am.

The code below shows some of the text for a class called City.
Now write a complete public constructor with two formal parameters:
a String parameter called cityName, and an int parameter called cityPop.
Your code should initialize the name attribute of the class to the value of
cityName, and it should intitialize the population attribute to the value
of cityPop.


public class City {

private String name;
private int population;

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Computer Science - Consider the following application files: /JavaCS1/src/...
Visual Basic - what does IntTemp and IntRem mean? and whats wrong with my code, ...
Programming - Here is the question that I need help to write the code for the ...
C++ - class professor {}; class teacher : public virtual professor {}; class ...
Programming - Here is the source code for the Kitty class: public class Kitty { ...
English - Hy guys! I'll write a test tomorrow, and we will have to write a ...
programming - There are several types of room in a hotel. The HotelRoom Class of...
java programming - Provide a class called Letter for authoring a simple letter. ...
computer science - I need to see if someone can hepl me with a c# programming ...
criminal justice - Which of the following theories holds that each citizen ...

For Further Reading

Search
Members
Community