سلام عليكم
شباب انا قررت تدخا عالم الجافا
نزلت كتاب اسمه How to program sixth edition
By H. M. Deitel
الكتاب بالانكليزي انا عندي شوية لغة
المهم في حاجة مافهمته
هذاالكود ممكن احد يشرحها لي
public class GradeBook
{
private String courseName;
public GradeBook( String name )
{
courseName = name;
}
public void setCourseName( String name )
{
courseName = name;
}
public String getCourseName()
{
return courseName;
}
public void displayMessage()
{
System.out.printf( "Welcome to the grade book for\n%s!\n",
getCourseName() );
}
}
وهذ الكلام بالانكليزي
ياليت احد يشرحه لي
Let's begin with a simple analogy to help you understand classes and their contents. Suppose you want to drive a car and make it go faster by pressing down on its accelerator pedal. What must happen before you can do this? Well, before you can drive a car, someone has to design the car. A car typically begins as engineering drawings, similar to the blueprints used to design a house. These engineering drawings include the design for an accelerator pedal to make the car go faster. The pedal "hides" the complex mechanisms that actually make the car go faster, just as the brake pedal "hides" the mechanisms that slow the car and the steering wheel "hides" the mechanisms that turn the car. This enables people with little or no knowledge of how engines work to drive a car easily.
