Eclipse ile Java geliştirirken çalıştığınız projeyi sol taraftaki projeler alanından sildiğinizde veya daha önceden çalıştığınız bir projeyi başka bir bilgisayardaki Eclipse üzerinde çalıştırmak istediğinizde proje dosyalarını eclipse çalışma ortamına (workspace) tanıtmanız gerekiyor. DEVAMINI OKU »
Write 2 classes which are public and named Square and Cube.
The class Cube extends the class Square.
The class Square has 2 fields which are protected integers named x and y. It has one constructor that takes two integers and assigns them to x and y. DEVAMINI OKU »
A TangoDancer has a name and may have a partner who is also a TangoDancer. If TangoDancer ‘A’ chooses TangoDancer ‘B’ to be a partner, the operation succeeds if neither ‘A’ nor ‘B’ already has a partner, and A is not B. Write the choosePartner method and additional methods as desired so that the following interactions work: DEVAMINI OKU »
I. Implement the PersonalData class with the following UML diagram.
A PersonalData object is created using one of the two constructors. First constructor uses java.util.Date and social security number (SSN) data. Second constructor uses three integers and a long value. DEVAMINI OKU »
(Find Nth Smallest Number) Write a program that finds nth smallest element among 15 integer values created randomly from the range 1-100. The value n will be given by the user (1 through 15). Searching the array must be performed by a method with the following header: DEVAMINI OKU »
(Complex Number) Write a ComplexNumber class that is similar to the RationalNumber. The class contains:
- Private double data fields named as re and im (corresponding to real and imaginary parts, respectively).
- The following methods DEVAMINI OKU »
(Geometry: n-sided regular polygon) In an n-sided regular polygon all sides have the same length and all angles have the same degree (i.e., the polygon is both equilateral and equiangular). Design a class named RegularPolygon that contains:
- A private int data field named n that defines the number of sides in the polygon with default values 3. DEVAMINI OKU »
(The Rectangle class) Design a class named Rectangle to represent a rectangle. The class contains:
- Two double data fields named width and height that specify the width and height of the rectangle. The default values are 1 for both width and height.
- A no-arg constructor that creates a rectangle with default values. DEVAMINI OKU »
(Geometry of a regular polygon) A regular polygon is an n-sided polygon in which all sides are of the same length and all angles have the same degree (i.e., the polygon is both equilateral and equiangular). The formula for computing the area of a regular polygon is DEVAMINI OKU »
(Palindromic prime) A palindromic prime is a prime number and also palindromic. For example, 131 is a prime and also a palindromic prime, as are 313 and 757. Write a program that displays the first 100 palindromic prime numbers. Display 10 numbers per line, separated by exactly one space, as follows: DEVAMINI OKU »