# Problems

## Project 1:

### Problem Statement :&#x20;

This project will enable us to perform create read update and delete (CRUD) operation on/of a manager.&#x20;

### Pre-conditions :&#x20;

Two default managers should always be present for testing purpose.&#x20;

### Design :

![](https://3494582050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSemf7mp1liQa7nfIAC%2F-LdJkXHkVwnM2VQ9y4j1%2F-LdJlC7ltVfKLwBPNxBk%2FIMG_V1.gif?alt=media\&token=4b06cd87-fece-4ff6-b445-49c80487be76)

### Step 1: Create one class : Manager

```javascript
Create one class : Manager

Attributes :
managerId
name
age
salary
gender
yearOfExp
projects[]
phonenumbers[]

Methods : 
Getters and Setters , Constructors (both Parameterized and no args)
```

### Step 2: Class for virtual database : VirtualDatabaseUtil

```javascript
Class for virtual database : VirtualDatabaseUtil

 Attributes:
 static managerTable[] 
 
 static block to initialize managerTable with some manager objects
 
 Methods:
 Only static getter method
```

### Step 3: Class to interact with virtualDB ManagerDAOImpl

```javascript
Class to interact with virtualDB ManagerDAOImpl 
 Methods:
 + basic CRUD (save,update,findById,findAll,delete)
```

### Step 4: Class for bussiness logic : ManagerServiceImpl

```javascript
Class for bussiness logic : ManagerServiceImpl
  Methods:
 + basic CRUD (save,update,findById,findAll,delete)
 + getAllProjectsStartingWithEventById()
 
 ex: all project starting with "Event" of manager "id : 2"
```

### Step 5: Class for utility methods : Utility

```java
Class for utility methods : Utility

Static Methods:
+compareTwoNumbers
+isOddSum
+isEvenSum
```

### Step 6: Class for all screen messages and error : ManagerContants

```javascript
Class for all screen messages and error : ManagerContants

Static Attributes:
Manager Id
Manager Name
Age
Salary
Sender
Years Of Exp
Projects Accomplished
Phone Numbers
```

### Step 7:  Class for Testing : ManagerTest

```javascript
Class for Testing : ManagerTest

Method:
+ main()
+ displayMenu()
```

### GitHub Link:

{% embed url="<https://github.com/mmalhotra2000/ManagerProject>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gyansetu-java.gitbook.io/core-java/access-modifiers/problems.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
