الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

ممكن مساعده في كتاب Java how to programing

مغلق
بدأه طالب_علم في 4 مايو 2003 · 5 رد · 1,007 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

لو سمحتم يا اخوان

بصراحه انا طالب برمجة في احد الجامعات وحاليا انا ادرس الجافا

وبالتحديد كتاب java how to programing

في اثناء دراسة للجافا من خلال هذا الكتاب بصراحه واجهة صعوبات

كثيره في مسائل المصفوفات array ch7 وخاصة multi subscripted arrays

فهل ممكن احد يطلع على هالمسائل وخاصة ch7.30 ch7.34

ويعطني some advice

وكيف في هذي المسائل اعمل spelled

و شكرا .....

#2

اكتب المسائل

#3

السلام عليكم

الرجــــاء من الأخ إرسال ما يريد من برامج لأننى ليس لدى الكتاب

;)

#4

اوكي

شوف المطلوب عمل برناامج يقوم بادخال كلمه في مصفوفه بحيث الإستهجاء

لهذه الكلمه يكون الحرف الأول نفس الحرف الأخير مثل كلمة radar

تخزين هذه الكلمه في مصفوفه .......... المطلوب كتابة recursive method

ترجع 1 إذا كان الأستهجاء صحيح وخطأ ترجع 0 .......... هذا هو الربرنامج

وشكرا

#5

غدا ارسل الجواب ا ن شاء الله

#6
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class myExam1 extends JFrame implements ActionListener
{

	private JLabel lbl1, lbl2;
	private JTextField txt1;

	public myExam1()
	{
  super("Plaindrome Prog");

  lbl1 = new JLabel("Enter a string");
  txt1 = new JTextField(20);
  txt1.addActionListener(this);
  lbl2 = new JLabel("");

  Container cont = this.getContentPane();
  cont.setLayout(new FlowLayout());

  cont.add(lbl1);
  cont.add(txt1);
  cont.add(lbl2);

  this.setSize(400, 150);
  this.setVisible(true);

	}


	public static void main(String [] arg)
	{

  myExam1 application = new myExam1();
  application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

	}

	public void actionPerformed(ActionEvent e)
  {
  String str = e.getActionCommand();
  //String str = txt1.getText();

  char [] copy = str.toCharArray();
  if (testPlaindrome(copy, 0, copy.length-1) == 1)
  {
 	 lbl2.setText("Plaindrome ");
  }
  else
  {
 	 lbl2.setText("NOT a Plaindrome ");
  }
	}

	public int testPlaindrome(char array[], int left, int right)
	{
  // ignore the puctution characters
  while( array == ' ' || array == '?')
  {
 	 left++;
  }

  while( array == ' ' || array == '?')
  {
 	 right--;
  }

  // base case
  if(left == right || left > right)
 	 return 1;

  else if (array != array)
    return 0;
 	 else
    return testPlaindrome(array, left+1, right-1);

	}


} // end of outer class "TimeTestWindow"

هذا الموضوع مغلق.

مواضيع مشابهة