Posts

Showing posts with the label Class

Components of class | Class | Object | Getter | Setter | toString | Custom method

Image
Let's discuss Components of class | Class | Object | Getter | Setter | toString | Custom method : The concept of object oriented programming (OOP) often difficult for the newly coming students in the programming. Now the new and more efficient way of programming is OOP, in which deal with the objects of the classes and code our desired program. There are some basic components are  involve in the OOP just as class, objects, member variable or fields, getter ,setter, toString method, and custom methods. There are lot of theatrical examples and explanations of the OOP which hardly understand. Let's Programming bring a practical scenario of OOP with the basic components of class.We hope that you learn more by this.    (note: please copy it and paste on by one class on your compiler and learn the components of the custom class) Class No: 1 (The custom class) public class getter_setter {           ...

Basic concepts Game in Java "Playing Card" | Playing card game with face and suits

T his is a source code of game "The Playing card game " in java. By this student can clear their concepts about gaming in java and also who a playing card game be developed. In this game I used classes, Objects, methods and others thing which is necessary for the gaming in the Java. It is consist of three class, you copy all the class and then paste in in your compiler, after changing the name of class and package you will be able to use it. Class No:1 package PlayingCard; public class Card {      // fields for class            String face ; // card number ace, deuce ....            String suit ; // signs of card hearts diamond ....      // constructor for the class      public Card( String faceOfcard , String suitOfcard )      {       ...