Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Exam Seating Arrangement System in Java
Exam Seating Arrangement System in Java [message #1848849] Tue, 21 December 2021 05:45 Go to next message
Aarti Yadav is currently offline Aarti YadavFriend
Messages: 5
Registered: August 2020
Junior Member
Hello All, I am working on java project and I want to know the source code of Exam Seating Arrangement System Project. Basically, There are primarily two entities, the admin and the student. Both entities can log in and register to the system, check and access the system as per the approval granted to them. The admin can see all the relevant details of the students and provide the input to the system taking into consideration the need like the branch, semester, year, subject of the student. Admin will input details like the total students, available classes with the number of seats, etc. After gathering all this information the system will generate a seating arrangement based on the row number and the students' roll number. and I have taken this reference from here https://www.interviewbit.com/blog/java-projects/ Can anyone provide me the source code of the exam seating arrangement system?
Re: Exam Seating Arrangement System in Java [message #1848850 is a reply to message #1848849] Tue, 21 December 2021 08:20 Go to previous messageGo to next message
Jay Arthanareeswaran is currently offline Jay ArthanareeswaranFriend
Messages: 128
Registered: July 2009
Senior Member
Hello, this forum is for specific questions on Eclipse's JDT project and you are very unlikely to get any response to your question.
I recommend you post your question in a general Java forum.
Re: Exam Seating Arrangement System in Java [message #1858371 is a reply to message #1848849] Fri, 31 March 2023 08:17 Go to previous message
Gulshan Negi is currently offline Gulshan NegiFriend
Messages: 5
Registered: December 2021
Junior Member
You can try this Java Program:

import java.util.*;

public class ExamSeatingArrangement {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);

// Prompt the user to enter the number of students
System.out.print("Enter the number of students: ");
int numStudents = sc.nextInt();

// Prompt the user to enter the number of rows and columns
System.out.print("Enter the number of rows: ");
int numRows = sc.nextInt();
System.out.print("Enter the number of columns: ");
int numCols = sc.nextInt();

// Calculate the total number of seats available
int numSeats = numRows * numCols;

// Check if there are enough seats for all the students
if (numStudents > numSeats) {
System.out.println("There are not enough seats for all the students!");
return;
}

// Create a 2D array to represent the seating arrangement
int[][] seatingArrangement = new int[numRows][numCols];

// Assign seats to students
int studentNumber = 1;
for (int i = 0; i < numRows; i++) {
for (int j = 0; j < numCols; j++) {
if (studentNumber <= numStudents) {
seatingArrangement[i][j] = studentNumber;
studentNumber++;
}
}
}

// Print the seating arrangement
System.out.println("Seating Arrangement:");
for (int i = 0; i < numRows; i++) {
for (int j = 0; j < numCols; j++) {
if (seatingArrangement[i][j] == 0) {
System.out.print(" ");
} else {
System.out.printf("%2d", seatingArrangement[i][j]);
}
}
System.out.println();
}
}
}

Hope this code will help you, found program on the internet, you can check the source code herehttps://www.techgeekbuzz.com/blog/java-projects/

[Updated on: Fri, 31 March 2023 08:21]

Report message to a moderator

Previous Topic:Java 20 Support for Eclipse
Next Topic:code style (and auto formatting) not working
Goto Forum:
  


Current Time: Fri Apr 26 12:28:06 GMT 2024

Powered by FUDForum. Page generated in 0.03866 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top