Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please explain thoughtfully and thoroughly. What is the difference between a cla

ID: 3843010 • Letter: P

Question

Please explain thoughtfully and thoroughly. What is the difference between a class constructor and an object constructor? Explain each part of "Scanner input = new Scanner (System.in);" Explain iteration. How is iteration related to data structures and strings. Why is iteration important? What does it take to successfully program a graphical user interface? Be descriptive as possible and you may use code examples to help illustrate your point. Explain iteration. How is iteration related to data structures and strings. Why is iteration important?

Explanation / Answer

1.Class constructor is the type of constructor and it is also kn own as static constructor.
This can be accessed when system accesses the class for the first time.

CONSTRUCTOR( ) is called when we instant the object, whereas call of CLASS_CONSTRUCTOR( )
method is different based how the class is accessed.

There is a need way to create an object "type" that can be used multiple times without having
to redefine the object to meet each particular instance's needs. The standard
way to achieve this is to use the Object Constructor function.

2.Scanner: The Scanner class in a java.util, which allows the user to read values of various types

System.in: An InputStream which is typically connected to keyboard input of programs

                       Scanner input=new Scanner(System.in)


above line will Scanner class with argument System.in, and will return a reference to newly constructed object.

input is used for connected to a Input Stream that is connected to Keyboard, so now at run-time we can take user input to do required operation.

3.Iterator:

The collection classes provides traversal of
their content through a java.util.iterator interface.

The use of specific type of data structure called a string.
Iteration: In programming language if set of instructions
has to be repeated, Iteration methods is used.
Interative methods are also called as loop structures.

4.

A graphical user interface is a human computer interface.

Gui is easier to learn and use.
It allows multitasking.

5.Iterator:

The collection classes provides traversal of
their content through a java.util.iterator interface.

The use of specific type of data structure called a string.
Iteration: In programming language if set of instructions
has to be repeated, Iteration methods is used.
Interative methods are also called as loop structures.