Institute of Space Technology, Islamabad

Programming Fundamentals

1st Semester Project, Group 4
ClashBuster Makeup class ka slot, ab zero clash.

Dono ne same room aur time liya, clash hua. ClashBuster ne B ko free slot par bhej diya.

Masla kiya hai? 😤

Time table to hai, lekin makeup class ke liye koi system nahi.

👉 Swipe karo

💥 Clash par clash

Ek teacher ne CR/GR ka slot book kiya, doosre ne bhi wohi le liya. Dono aate hain, room ek hi hota hai.

📅 Regular class se takraao

Makeup ka time kisi aur section ki class se takra jata hai, kyunke koi check nahi karta.

⏳ Waqt ki barbaadi

Kon sa room kab free hai, ye pata karna mushkil. Students aur teachers dono pareshaan.

Hamara hal 🛠️

Har booking se pehle program khud check karta hai.

📝

Request

Room, din aur start/end time enter hota hai.

🔍

Check

Regular time table aur pehle ke makeup slots se match hota hai.

🚦

Confirm ya reject

Clash ho to wajah batata hai aur free slot suggest karta hai.

💾

File mein save

Booking text file mein store hoti hai, data nahi jata.

C++ mein kya use hoga 👨‍💻

PF ke concepts: pointers tak aur file handling.

🧱 Basics

Variables, loops, if/else, functions, arrays aur structs.

👉 Pointers

Dynamic array of bookings, aur function ko pointer pass karna.

📁 File handling

ofstream se booking save, ifstream se shuru mein load.

struct Booking { string room, teacher; int day, start, end; };

bool hasClash(Booking* list, int n, Booking& req) {
    for (int i = 0; i < n; i++) {
        if (list[i].room == req.room && list[i].day == req.day &&
            req.start < list[i].end && list[i].start < req.end)
            return true;   // overlap = clash
    }
    return false;
}

Front end 🎨

C++ ka logic end mein is HTML interface se connect karenge.

❌ Abhi

Zubani ya WhatsApp se booking, koi clash check nahi, koi record nahi.

✅ ClashBuster ke baad

Ek jagah se booking, automatic clash check, saara record file mein.

Group 4, aap kiya kehte ho? 🚀

Real problem, simple C++, aur ek acha interface. Ye project hum sab bana sakte hain.