Institute of Space Technology, Islamabad
Dono ne same room aur time liya, clash hua. ClashBuster ne B ko free slot par bhej diya.
Time table to hai, lekin makeup class ke liye koi system nahi.
👉 Swipe karo
Ek teacher ne CR/GR ka slot book kiya, doosre ne bhi wohi le liya. Dono aate hain, room ek hi hota hai.
Makeup ka time kisi aur section ki class se takra jata hai, kyunke koi check nahi karta.
Kon sa room kab free hai, ye pata karna mushkil. Students aur teachers dono pareshaan.
Har booking se pehle program khud check karta hai.
Room, din aur start/end time enter hota hai.
Regular time table aur pehle ke makeup slots se match hota hai.
Clash ho to wajah batata hai aur free slot suggest karta hai.
Booking text file mein store hoti hai, data nahi jata.
PF ke concepts: pointers tak aur file handling.
Variables, loops, if/else, functions, arrays aur structs.
Dynamic array of bookings, aur function ko pointer pass karna.
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;
}
C++ ka logic end mein is HTML interface se connect karenge.
Zubani ya WhatsApp se booking, koi clash check nahi, koi record nahi.
Ek jagah se booking, automatic clash check, saara record file mein.
Real problem, simple C++, aur ek acha interface. Ye project hum sab bana sakte hain.