Hi! I’m looking for help with this assignment
Attached is the pdf
this is the input
Manager, Mohammed, 1, 60000
Add_Developer, Hala, 2, 30000
Add_Developer, Fatima, 3, 35000
Add_Developer, Omar, 4, 25000
Add_Developer, Ahmed, 5, 42000
Add_Developer, Yousef, 6, 45000
Add_Designer, Khalid, 7, 45000
Add_Designer, Sara, 8, 25000
Add_Designer,Ali , 9, 36000
Add_Designer, Layla, 10, 39000
Give_Leave,1,3, 2024-04-01, 10
Give_Leave,1,7, 2024-04-02, 5
Give_Leave,1,15, 2024-04-03, 7
Give_Leave,2,15, 2024-04-03, 7
Give_Leave,1,8, 2024-04-03, 7
Change_State,1, 7, Working
Give_Leave,1, 3, 2024-08-12, 5
Change_State,1, 3, Working
Give_Leave,1, 3, 2024-08-12, 5
del_Employee,2
del_Employee,5
del_Employee,15
printAllEmployees
print_Leave_Records,3
This is the output
Manager Mohammed added.
Developer Hala added.
Developer Fatima added.
Developer Omar added.
Developer Ahmed added.
Developer Yousef added.
Designer Khalid added.
Designer Sara added.
Designer Ali added.
Designer Layla added.
Leave approved for Fatima.
Leave approved for Khalid.
Leave approval failed. Either manager ID is incorrect or employee ID does not exist.
Leave approval failed. Either manager ID is incorrect or employee ID does not exist.
Leave approved for Sara.
Employee Khalid is now marked as working.
Cannot approve leave for Fatima as they are already on leave.
Employee Fatima is now marked as working.
Leave approved for Fatima.
Employee removed successfully.
Employee removed successfully.
Employee with ID 15 not found.
Name ID Salary Bonus
Mohammed 1 60000.00 9000.00
Fatima 3 35000.00 4200.00
Omar 4 25000.00 3000.00
Yousef 6 45000.00 5400.00
Khalid 7 45000.00 4500.00
Sara 8 25000.00 2500.00
Ali 9 36000.00 3600.00
Layla 10 39000.00 3900.00
Leave Records for Fatima:
Start Date Days of Leave
2024-04-01 10
2024-08-12 5
Category: Java
Instructions: You must submit two separate copies (one Word file and one PDF fil
Instructions:
You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on Blackboard via the allocated folder. These files must not be in compressed format.
It is your responsibility to check and make sure that you have uploaded both the correct files.
Zero mark will be given if you try to bypass the SafeAssign (e.g. misspell words, remove spaces between words, hide characters, use different character sets, convert text into image or languages other than English or any kind of manipulation).
Email submission will not be accepted.
You are advised to make your work clear and well-presented. This includes filling your information on the cover page.
You must use this template, failing which will result in zero mark.
You MUST show all your work, and text must not be converted into an image, unless specified otherwise by the question.
Late submission will result in ZERO mark.
The work should be your own, copying from students or other resources will result in ZERO mark.
Use Times New Roman font for all your answers.
Name: ###
CRN: ###
ID: ###
Learning Outcome(s):
CLO4:
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures.
2 Marks
Question One
Find the issues in the following Java code, then correct them.
public class Rectangular
{
private int length;
private int width;
public Rectangular(int length, int width)
{
this.length = length;
this.width = width;
}
public String area ()
{
return length * width;
}
}
public class RectangularTest
{
public static void main (String[] args)
{
Rectangular r1 = new Rectangular(3,5);
System.out.println(area());
}
}
2 Marks
Learning Outcome(s): CLO4:
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures.
Question Two
1-Create a Java class for Student with the following requirements:
Each student has two attributes: Name and ID.
Create two constructors. One constructor without parameters to initialize all the instance variables to default values, and another constructor to initialize all the attributes to specific values.
Add all setter and getter methods.
2-Create a tester class with the main method with the following requirements.
Create two objects from Student class. Create the first object using the default constructor and the second object must set your name and ID.
Print your name and ID using getter methods.
Sample of the output:
2 Marks
Learning Outcome(s): CLO4:
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures.
Question Three
Suppose you have the following 2 dimensions array:
int arr[][] = {
{ 10, 11, 12, 13, 14 },
{ 15, 16, 17, 18, 19 },
{ 20, 21, 22, 23, 24 },
{ 25, 26, 27, 28, 29 },
{ 30, 31, 32, 33, 34 }
};
With the the following rows and columns sizes:
static int rows= 5;
static int columns= 5;
Write a Java programs that uses takes arr[][] and reverse (mirror) all rows. For example, the first row should be as the following after you reverse it 14 13 12 11 10. A screenshot of your output should also be included in your answer and should display both the original array and the reversed array.
Sample output:
2 Marks
Learning Outcome(s): CLO(4):
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures.
Question Four
What is the output of the following Java program?
public class Exam
{
static int studyingHours = 31;
private String course = “OOP”;
public void compute(int studyingHours)
{
Exam e = new Exam();
this.studyingHours = 24;
course = “Math”;
System.out.println(“Exam.studyingHours: ” + Exam.studyingHours);
System.out.println(“e.studyingHours: ” + e.studyingHours);
System.out.println(“e.course: ” + e.course);
System.out.println(“course: ” + course);
}
public static void main(String args[])
{
Exam e = new Exam();
e.compute(31);
}
}
Instructions: You must submit two separate copies (one Word file and one PDF fil
Instructions:
You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on Blackboard via the allocated folder. These files must not be in compressed format.
It is your responsibility to check and make sure that you have uploaded both the correct files.
Zero mark will be given if you try to bypass the SafeAssign (e.g. misspell words, remove spaces between words, hide characters, use different character sets, convert text into image or languages other than English or any kind of manipulation).
Email submission will not be accepted.
You are advised to make your work clear and well-presented. This includes filling your information on the cover page.
You must use this template, failing which will result in zero mark.
You MUST show all your work, and text must not be converted into an image, unless specified otherwise by the question.
Late submission will result in ZERO mark.
The work should be your own, copying from students or other resources will result in ZERO mark.
Use Times New Roman font for all your answers.
Name:
Name:
Name:
Name:
ID:
ID:
ID:
ID:
Learning Outcome(s): CLO4
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures, procedures and arrays, objects and classes
CLO5
Demonstrate Integrated Development Environment (IDE) for the editing, building, debugging, and testing of programs
Description and Instructions
Project Instructions
This project enables the students to integrate the covered knowledge and skills in this course.
Total Marks = 14
Group Size = 3- 4 members.
Submit all files: Project Report (Word and PDF) on blackboard before 15th May 2024. Marks will be given based on your submission and quality of the contents.
Each group must come up with a unique solution for the project based on the below description.
Implement the Simple Library Management System according to the requirements provided.
Write a Java program to demonstrate the functionality of the system.
Include comments in your code to explain the purpose of each class, method, and important code block.
Test your program with different scenarios to ensure that it works as expected.
Learning Outcome(s): CLO4
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures, procedures and arrays, objects and classes
CLO5
Demonstrate Integrated Development Environment (IDE) for the editing, building, debugging, and testing of programs
Project Title: Library Management SystemDescription: You are tasked with developing a Library Management System in Java. The system should allow librarians to manage the library’s collection of books and assist clients in borrowing and returning books. Additionally, clients should be able to search for books by title or author.
Requirements:
1-Book Class:
Create a Book class with the following attributes:
title (String): The title of the book.
author (String): The author of the book.
available (boolean): The availability status of the book (true if available, false if borrowed).
Implement appropriate getter and setter methods for each attribute.
2-Library Class:
Create a Library class to manage the library’s collection of books. Include methods to:
Add a new book to the library.
Display a list of available books.
Allow clients to borrow books.
Allow clients to return books.
Search for books by title or author.
3-User Interface:
Implement a simple command-line interface (CLI) for librarians and clients to interact with the system.
Provide menu options for librarians to perform actions such as adding books, displaying available books, searching for books, borrowing books, and returning books.
Allow clients to search for books by title or author.
Learning Outcome(s): CLO4
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures, procedures and arrays, objects and classes
CLO5
Demonstrate Integrated Development Environment (IDE) for the editing, building, debugging, and testing of programs
4-Sample Data:
Add at least three sample books to the library’s collection during initialization.
5-Functionality:
When a client borrows a book, update the book’s availability status to reflect that it is no longer available.
When a client returns a book, update the book’s availability status to reflect that it is available again.
Implement search functionality to allow clients to search for books by title or author.
6-Error Handling:
Implement basic error handling to handle cases such as invalid input and book availability checks.
7-Testing:
Test the functionality of the system by performing various actions such as adding books, searching for books, borrowing books, and returning books. (Include screen-shots of your output)
Instructions: You must submit two separate copies (one Word file and one PDF fil
Instructions:
You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on Blackboard via the allocated folder. These files must not be in compressed format.
It is your responsibility to check and make sure that you have uploaded both the correct files.
Zero mark will be given if you try to bypass the SafeAssign (e.g. misspell words, remove spaces between words, hide characters, use different character sets, convert text into image or languages other than English or any kind of manipulation).
Email submission will not be accepted.
You are advised to make your work clear and well-presented. This includes filling your information on the cover page.
You must use this template, failing which will result in zero mark.
You MUST show all your work, and text must not be converted into an image, unless specified otherwise by the question.
Late submission will result in ZERO mark.
The work should be your own, copying from students or other resources will result in ZERO mark.
Use Times New Roman font for all your answers.
Name: ###
CRN: ###
ID: ###
Learning Outcome(s):
CLO4:
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures.
2 Marks
Question One
Find the issues in the following Java code, then correct them.
public class Rectangular
{
private int length;
private int width;
public Rectangular(int length, int width)
{
this.length = length;
this.width = width;
}
public String area ()
{
return length * width;
}
}
public class RectangularTest
{
public static void main (String[] args)
{
Rectangular r1 = new Rectangular(3,5);
System.out.println(area());
}
}
2 Marks
Learning Outcome(s): CLO4:
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures.
Question Two
1-Create a Java class for Student with the following requirements:
Each student has two attributes: Name and ID.
Create two constructors. One constructor without parameters to initialize all the instance variables to default values, and another constructor to initialize all the attributes to specific values.
Add all setter and getter methods.
2-Create a tester class with the main method with the following requirements.
Create two objects from Student class. Create the first object using the default constructor and the second object must set your name and ID.
Print your name and ID using getter methods.
Sample of the output:
2 Marks
Learning Outcome(s): CLO4:
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures.
Question Three
Suppose you have the following 2 dimensions array:
int arr[][] = {
{ 10, 11, 12, 13, 14 },
{ 15, 16, 17, 18, 19 },
{ 20, 21, 22, 23, 24 },
{ 25, 26, 27, 28, 29 },
{ 30, 31, 32, 33, 34 }
};
With the the following rows and columns sizes:
static int rows= 5;
static int columns= 5;
Write a Java programs that uses takes arr[][] and reverse (mirror) all rows. For example, the first row should be as the following after you reverse it 14 13 12 11 10. A screenshot of your output should also be included in your answer and should display both the original array and the reversed array.
Sample output:
2 Marks
Learning Outcome(s): CLO(4):
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures.
Question Four
What is the output of the following Java program?
public class Exam
{
static int studyingHours = 31;
private String course = “OOP”;
public void compute(int studyingHours)
{
Exam e = new Exam();
this.studyingHours = 24;
course = “Math”;
System.out.println(“Exam.studyingHours: ” + Exam.studyingHours);
System.out.println(“e.studyingHours: ” + e.studyingHours);
System.out.println(“e.course: ” + e.course);
System.out.println(“course: ” + course);
}
public static void main(String args[])
{
Exam e = new Exam();
e.compute(31);
}
}
i have this assignment for Java i want you to answer all the questions as requir
i have this assignment for Java
i want you to answer all the questions as required in the questions
the name for q2 is ( ATHEER ALZAHRANI ) and the id is ( S200325012 )
Instructions: You must submit two separate copies (one Word file and one PDF fil
Instructions:
You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on Blackboard via the allocated folder. These files must not be in compressed format.
It is your responsibility to check and make sure that you have uploaded both the correct files.
Zero mark will be given if you try to bypass the SafeAssign (e.g. misspell words, remove spaces between words, hide characters, use different character sets, convert text into image or languages other than English or any kind of manipulation).
Email submission will not be accepted.
You are advised to make your work clear and well-presented. This includes filling your information on the cover page.
You must use this template, failing which will result in zero mark.
You MUST show all your work, and text must not be converted into an image, unless specified otherwise by the question.
Late submission will result in ZERO mark.
The work should be your own, copying from students or other resources will result in ZERO mark.
Use Times New Roman font for all your answers.
Name: ###
CRN: ###
ID: ###
Learning Outcome(s):
CLO4:
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures.
2 Marks
Question One
Find the issues in the following Java code, then correct them.
public class Rectangular
{
private int length;
private int width;
public Rectangular(int length, int width)
{
this.length = length;
this.width = width;
}
public String area ()
{
return length * width;
}
}
public class RectangularTest
{
public static void main (String[] args)
{
Rectangular r1 = new Rectangular(3,5);
System.out.println(area());
}
}
2 Marks
Learning Outcome(s): CLO4:
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures.
Question Two
1-Create a Java class for Student with the following requirements:
Each student has two attributes: Name and ID.
Create two constructors. One constructor without parameters to initialize all the instance variables to default values, and another constructor to initialize all the attributes to specific values.
Add all setter and getter methods.
2-Create a tester class with the main method with the following requirements.
Create two objects from Student class. Create the first object using the default constructor and the second object must set your name and ID.
Print your name and ID using getter methods.
Sample of the output:
2 Marks
Learning Outcome(s): CLO4:
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures.
Question Three
Suppose you have the following 2 dimensions array:
int arr[][] = {
{ 10, 11, 12, 13, 14 },
{ 15, 16, 17, 18, 19 },
{ 20, 21, 22, 23, 24 },
{ 25, 26, 27, 28, 29 },
{ 30, 31, 32, 33, 34 }
};
With the the following rows and columns sizes:
static int rows= 5;
static int columns= 5;
Write a Java programs that uses takes arr[][] and reverse (mirror) all rows. For example, the first row should be as the following after you reverse it 14 13 12 11 10. A screenshot of your output should also be included in your answer and should display both the original array and the reversed array.
Sample output:
2 Marks
Learning Outcome(s): CLO(4):
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures.
Question Four
What is the output of the following Java program?
public class Exam
{
static int studyingHours = 31;
private String course = “OOP”;
public void compute(int studyingHours)
{
Exam e = new Exam();
this.studyingHours = 24;
course = “Math”;
System.out.println(“Exam.studyingHours: ” + Exam.studyingHours);
System.out.println(“e.studyingHours: ” + e.studyingHours);
System.out.println(“e.course: ” + e.course);
System.out.println(“course: ” + course);
}
public static void main(String args[])
{
Exam e = new Exam();
e.compute(31);
}
}
Instructions: You must submit two separate copies (one Word file and one PDF fil
Instructions:
You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on Blackboard via the allocated folder. These files must not be in compressed format.
It is your responsibility to check and make sure that you have uploaded both the correct files.
Zero mark will be given if you try to bypass the SafeAssign (e.g. misspell words, remove spaces between words, hide characters, use different character sets, convert text into image or languages other than English or any kind of manipulation).
Email submission will not be accepted.
You are advised to make your work clear and well-presented. This includes filling your information on the cover page.
You must use this template, failing which will result in zero mark.
You MUST show all your work, and text must not be converted into an image, unless specified otherwise by the question.
Late submission will result in ZERO mark.
The work should be your own, copying from students or other resources will result in ZERO mark.
Use Times New Roman font for all your answers.
Name:
Name:
Name:
Name:
ID:
ID:
ID:
ID:
Learning Outcome(s): CLO4
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures, procedures and arrays, objects and classes
CLO5
Demonstrate Integrated Development Environment (IDE) for the editing, building, debugging, and testing of programs
Description and Instructions
Project Instructions
This project enables the students to integrate the covered knowledge and skills in this course.
Total Marks = 14
Submit all files: Project Report (Word and PDF) on blackboard before 15th May 2024. Marks will be given based on your submission and quality of the contents.
Each group must come up with a unique solution for the project based on the below description.
Group Size = 3- 4 members.
Implement the Simple Library Management System according to the requirements provided.
Write a Java program to demonstrate the functionality of the system.
Include comments in your code to explain the purpose of each class, method, and important code block.
Test your program with different scenarios to ensure that it works as expected.
Learning Outcome(s): CLO4
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures, procedures and arrays, objects and classes
CLO5
Demonstrate Integrated Development Environment (IDE) for the editing, building, debugging, and testing of programs
Project Title: Library Management SystemDescription: You are tasked with developing a Library Management System in Java. The system should allow librarians to manage the library’s collection of books and assist clients in borrowing and returning books. Additionally, clients should be able to search for books by title or author.
Requirements:
Book Class:
Library Class:
User Interface:
Sample Data:
Functionality:
Error Handling:
Testing:
Create a Book class with the following attributes:
title (String): The title of the book.
author (String): The author of the book.
available (boolean): The availability status of the book (true if available, false if borrowed).
Implement appropriate getter and setter methods for each attribute.
Add a new book to the library.
Display a list of available books.
Allow clients to borrow books.
Allow clients to return books.
Search for books by title or author.
Implement a simple command-line interface (CLI) for librarians and clients to interact with the system.
Provide menu options for librarians to perform actions such as adding books, displaying available books, searching for books, borrowing books, and returning books.
Allow clients to search for books by title or author.
Create a Library class to manage the library’s collection of books. Include methods to:
Learning Outcome(s): CLO4
Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures, procedures and arrays, objects and classes
CLO5
Demonstrate Integrated Development Environment (IDE) for the editing, building, debugging, and testing of programs
Add at least three sample books to the library’s collection during initialization.
When a client borrows a book, update the book’s availability status to reflect that it is no longer available.
When a client returns a book, update the book’s availability status to reflect that it is available again.
Implement search functionality to allow clients to search for books by title or author.
Implement basic error handling to handle cases such as invalid input and book availability checks.
Test the functionality of the system by performing various actions such as adding books, searching for books, borrowing books, and returning books. (Include screen-shots of your output)
Q1) Find the issues in the following Java code, then correct them. public class
Q1) Find the issues in the following Java code, then correct them.
public class Rectangular
{
private int length;
private int width;
public Rectangular(int length, int width)
{
this.length = length;
this.width = width;
}
public String area ()
{
return length * width;
}
}
public class RectangularTest
{
public static void main (String[] args)
{
Rectangular r1 = new Rectangular(3,5);
System.out.println(area());
}
} Q2)
Create a Java class for Student with the following requirements:
Create a tester class with the main method with the following requirements.
Each student has two attributes: Name and ID.
Create two constructors. One constructor without parameters to initialize all the instance variables to default values, and another constructor to initialize all the attributes to specific values.
Add all setter and getter methods.
Create two objects from Student class. Create the first object using the default constructor and the second object must set your name and ID.
Print your name and ID using getter methods.
Q3)Suppose you have the following 2 dimensions array: int arr[][] = { { 10, 11, 12, 13, 14 }, { 15, 16, 17, 18, 19 }, { 20, 21, 22, 23, 24 }, { 25, 26, 27, 28, 29 }, { 30, 31, 32, 33, 34 } }; With the the following rows and columns sizes: static int rows= 5; static int columns= 5; Write a Java programs that uses takes arr[][] and reverse (mirror) all rows. For example, the first row should be as the following after you reverse it 14 13 12 11 10. A screenshot of your output should also be included in your answer and should display both the original array and the reversed array. Sample output:
Q4) What is the output of the following Java program? public class Exam { static int studyingHours = 31; private String course = “OOP”; public void compute(int studyingHours) { Exam e = new Exam(); this.studyingHours = 24; course = “Math”; System.out.println(“Exam.studyingHours: ” + Exam.studyingHours); System.out.println(“e.studyingHours: ” + e.studyingHours); System.out.println(“e.course: ” + e.course); System.out.println(“course: ” + course); } public static void main(String args[]) { Exam e = new Exam(); e.compute(31); } }
i have this assignment for Java i want you to answer all the questions as requir
i have this assignment for Java
i want you to answer all the questions as required in the questions
the name for q2 is ( ATHEER ALZAHRANI ) and the id is ( S200325012 )
In this project, you have the freedom to choose any topic that interests you. Wh
In this project, you have the freedom to choose any topic that interests you. Whether it’s a simple calculator application, a game, a data management system, or anything else, the choice is yours.
To guide you through the project, we’ve provided a comprehensive PDF attachment that demonstrates the implementation process step by step. You’ll find detailed instructions, code snippets, and explanations to help you replicate the functionality outlined in the PDF.
Feel free to get creative with your project topic and add your own unique touches. If you have any questions or need assistance along the way, don’t hesitate to reach out to your tutor for guidance.
We’re excited to see what you come up with and wish you the best of luck on your Java project journey!