DataStructure 2025
116 subscribers
25 photos
2 videos
44 files
21 links
Download Telegram
واجب المختبر انرسل على الكلاس
😱2👍1🤯1
السلام عليكم
ضروري جداً تملون هذا الفورم للكل بولونيا وتحميل
اخر موعد يوم الخميس الساعه ١٢ ظهراً

https://docs.google.com/forms/d/e/1FAIpQLSdkjNhjB8lFto4NalXS15Bh2ybc5-RFiU1Jrv_Cr7ndIXVBzQ/viewform
👍1
👍1
م.م مـؤمل ميثاق الحلفي ️🧑‍💻 ️️
https://t.me/AEAE_55_C
شرح data structure للفائدة
اي طالب اسمه مو بالعربي انزال من الكلاس
السلام عليكم
الطلاب الي حذفتهم دكتورة رائدة من الكلاس الخاص بالمادة تواصلت وياها في حال انطت فرصة ثانية للطلاب ابلغكم
اما في حال رفضها للفكرة اي شي ينزل بالكلاس ابلغكم بهاي القناه ما اعوفكم♥️
5👍2😢1🤣1
واجب مختبر هذا الاسبوع هو اكمال المهام التالية  كدوال :


§       قراءة مصفوفة احادية البعد


§       طباعة مصفوفة احادية البعد


§       ايجاد موقع عنصر معين


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


§       اضافة عنصر الى نهاية المصفوفة في حالة عدم
وجوده فيها


والبرنامج الرئيسي في ادناه:


 


 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------import java.util.Scanner;

public class project1 {

    static void screen(){
      System.out.println( "  .... Operations on Arrays..... ");
      System.out.println( " 1 ... Input Data ");
      System.out.println( " 2 ... Print Data ");
      System.out.println( " 3 ... Search an item  ");
      System.out.println( " 4 ... replace an item ");
      System.out.println( " 5 ... Add new item at end of array if it not found in it ");
      System.out.println( " 0 ... Exit ");
      System.out.print(" ENTER YOUR CHOICE [0..5] ");
   }//screen
   
    public static void main(String[] args) {
        screen();
        Scanner input = new Scanner(System.in);;
        int choice = input.nextInt();
        while (choice>=1 && choice <=5){
            switch (choice){
                case 1: System.out.println ("Here call method for read elments of array ");
                        break;
                case 2: System.out.println ("Here call method for print elments of array ");
                        break;
                case 3: System.out.println ("Here call method to return the position of specific element in array ");
                        break;
                case 4: System.out.println ("Here call method to replace specific element with new one");
                        break;
                case 5: System.out.println ("Here call method for add element at the end of array  ");
                        break;                  
            }// switch
            screen();
            choice = input.nextInt();
        }//while
       
    }// main
}//Project1
🤬8👍3🥰1🤯1
طلاب الواجب راح تمسحه من الكلاس
يعني ما راح تجيبو جاهز بس باجر راح تطبقون نفس هذا الكود

الكلاس القديم مال هذاك الواجب نفسه خلو والدالة الرئيسية سوولها كوبي بيست من الرسالة وهاهية
👍2
https://forms.gle/CCE8wMDw9sQKnPGC7

الكل تدخل تقدم طلب انضمام للفورم
Arrays- Data Structures.pdf
1.8 MB
مساء الخير
هاي الملزمة رسلتها الدكتورة بالكلاس خاف احد ما منظم للكلاس.
السلام عليكم
باجر ماكو كوز
والسلام عليكم ورحمه الله وبركاته
7😁4👍1
المجموعة الاولى :
8:30-9-40
المجموعة الثانية
9:40:10:50
قاعه ٨
2🥰1
السلام عليكم
طلاب يوم الاربعاء
محاضره ساعه ٨:٣٠ تصير ب١٢:٣٠
الي يريد ينقل من الاربعاء للاثنين يحضر باجر ويبلغ ست زينب او ست ود
طلاب باجر ياخذونا ست ود وست زينب
اما بخصوص الواجب راح ناخذه اثناء المختبر
👏1
طلاب التحميل محاضرتكم ثابتة
يوم الاربعاء ساعه ١٢:٣٠
غير مطالبين بالحضور مطالبين فقط بالواجبات
👍2
package javaapplication42;
import java.io.*;
import java.util.Scanner;

class Project1 {

static void writeToFile(String fileName){
try{
Scanner cin= new Scanner (System.in);
FileWriter f = new FileWriter(fileName, true);
PrintWriter file = new PrintWriter(f);
String line;
System.out.println ("WRITE TEXT as Line by Line .... for stop write 'stop' ");
line= cin.nextLine();
while (!line.equals("stop")){
file.println(line);
line= cin.nextLine();}
file.close();}
catch (IOException e){ System.out.println("Error"); }
}//writeToFile

static void readFile(String fileName){
try{
FileReader f = new FileReader(fileName);
BufferedReader file = new BufferedReader(f);
String line;
line= file.readLine();
while (line!=null){
System.out.println(line);
line=file.readLine();}
file.close();}
catch (IOException e){ System.out.println("Error"); }
}//readFile


static int FindNumberofLine(String fileName){
int linesNo=0;
try{
FileReader f = new FileReader(fileName);
BufferedReader file = new BufferedReader(f);
String line;
line= file.readLine();
while (line!=null){
linesNo++;
line=file.readLine();}
file.close();}
catch (IOException e){ System.out.println("Error"); }
System.out.println("number of line ::: "+linesNo);
return linesNo;
}//FindNumberofLine

//Method to get File Information
static void getFileInfo(String fileName) {
File myFile = new File(fileName);
if (myFile.exists()) {
System.out.println("File name: " + myFile.getName());
System.out.println("Absolute path: " + myFile.getAbsolutePath());
System.out.println("File size in bytes " + myFile.length());}

else {System.out.println("The file does not exist.");}
}//getFileInfo


static void modifyLine(String fileName, String newLine, int lineNo){
try{
FileReader fR = new FileReader(fileName);
BufferedReader fileR = new BufferedReader(fR);
FileWriter fW = new FileWriter("temp.txt", true);
PrintWriter fileW = new PrintWriter(fW);
String line;
int lineNumber=0;
line= fileR.readLine();
while (line!=null){
lineNumber++;
if (lineNumber==lineNo)
fileW.println(newLine);
else
fileW.println(line);
line=fileR.readLine();}
fileW.close();
fileR.close();}
catch (IOException e){ System.out.println("Error"); }
}//readFile
static void screen(){
System.out.println("1. Write to File");
System.out.println("2. Read from File");
System.out.println("3. Find number of line in File");
System.out.println("4. Modify given Line Number");
System.out.println("5. File Information");
System.out.println("0. Exit");
System.out.print("Please Enter 1...5 ::::");
}//Screen

public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String fName;
screen();
int choice = in.nextInt();
while (choice>=1 && choice <=5){
Scanner cin = new Scanner(System.in);
switch (choice){
case 1: System.out.print("Enter File Name :: ");
fName= cin.nextLine();// read name of file
writeToFile(fName); break;

case 2: System.out.print("Enter File Name :: ");
fName= cin.nextLine();// read name of file
readFile(fName); break;

case 3: System.out.print("Enter File Name :: ");
fName= cin.nextLine();// read name of file
FindNumberofLine(fName); break;

case 4: System.out.print("Enter File Name :: ");
fName = cin.nextLine();// read name of file
int lineNo; String newLine;
System.out.print("Enter new Line :: ");
newLine = cin.nextLine();
System.
🤯21
out.print("Line Number :: ");
lineNo = cin.nextInt();
modifyLine(fName, newLine, lineNo); break;

case 5: System.out.print("Enter File Name :: ");
fName= cin.nextLine();// read name of file
getFileInfo(fName); break;


default : System.out.println("OUT OF RANGE ");
}//switch
screen();
choice = in.nextInt();
}//while

System.out.print("Finish the processes ");

}//main
}//Project1
🤯4😢21