Assignments for ASDE2 Publicis.Sapient
View the Project on GitHub mukeshbasira/simple-java-maven-app
1.WEEK 1
2.WEEK 2
3.WEEK 3
4.WEEK 4
5.WEEK 5
6.WEEK 6
7.WEEK 7
8.WEEK 8
9.WEEK 9
10.WEEK 10
link - https://github.com/mukeshbasira/simple-java-maven-app/tree/week1
link - https://github.com/mukeshbasira/simple-java-maven-app/tree/week2
link - https://github.com/mukeshbasira/simple-java-maven-app/tree/week3
Accept username from user and print prime equivalent of that example - FADE -> d,2,7,b. (hexadecimal equivalent)
link - https://github.com/mukeshbasira/simple-java-maven-app/tree/week4
Write a java program to accept the string which will give the synonym of the given word, considering below scenario.
GoodMorning { GoodMorning Shubhodaya Shubhohday Bonjour}
GoodEvening { good Evening Shubha sange susandhya Bonsoir}
use scanner to accept the string from the end user, assuming if the user gives: GoodMorning, show the values associated for the same.
When the user gives GoodBye, which is not there in the Map, ask user if he/she want to add that to the list, when pressed “1”, then ask for the synonym in the loop till user enters a empty string, and the given word and synonym to be updated in the map.
link - https://github.com/mukeshbasira/simple-java-maven-app/tree/week5
Write a java program, to build a quiz application with the below requirements
upon showing the question which is stored in the list (about 10 questions), the user should be allowed to ask the option.
If the user selects correct option show next question failing which a message to be shown “Sorry wrong answer”, with the next question.
if the user does not answer the question given within 10 seconds then the application to be exited with the message “TIMEOUT!!!”
Helper / Hint:
class definition class Question { private String question; private String opt1, opt2, opt3, opt4; private String correctOpt; }
user daemon threads to tracking (didn’t used threads as of now + Using TimerTask ) — !! working on thread method —
link - https://github.com/mukeshbasira/simple-java-maven-app/tree/week6
Question: Consider an application to be developed for various size devices like desktop, tablet, mobile. And the company wants to test with the POC (Proof Of Concept), below are the requirements.
When the page is loaded with 300x350 px then the fonts to be Helvetica, 24pt,, and in Red Color.
link - https://github.com/mukeshbasira/simple-java-maven-app/tree/week7
—–Question Topic: Spring Framework IoC——
Question: Consider you are building a Mobile which has dependencies of Camera, Screen, Speaker which has-a relation.
Below is the prototype of the classes (only sample) Class -> Mobile Fields -> camera, speaker, screen
Create .xml files listed below for the classes phone.xml - Mobile screen.xml – Screen camera.xml - Camera speaker.xml – Speaker
Create a App.java file which will load the mobile class
Note: Make sure to use auto wire.
link - https://github.com/mukeshbasira/simple-java-maven-app/tree/week8
Given the architecture diagram from the manage you are asked to create an end to end program flow with following pointers.
link - https://github.com/mukeshbasira/simple-java-maven-app/tree/week9
Question:
Consider you are asked to create servlets for below end points /getEmps /getCustomer /getProducts
Eventually over course of time the company needs many such servlets due to this maintaining multiple servlets become difficult, create a single servlets which has the signature given below
<servlet>
<servlet-name>hi</servlet-name>
<servlet-class>com.something.ClassName</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>hi</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
You are asked to create a single servlet which will handle all the scenarios, use either switch case or if condition for routing.
link - https://github.com/mukeshbasira/simple-java-maven-app/tree/week10
Question:
Write a microservice application named
Please keep first set of 5 Meeting in the ArrayList
class Meeting
{
private int meetingId;
private String topic;
private String startTime;
private String endTime;
}
http://localhost:8080/meeting - GET - it should give all the meeting
http://localhost:8080/meeting/1234 - GET - it shoudl give me meeting with id 1234
http://localhost:8080/meeting/1234/participants - GET - get all the participants of meeting id 1234 (from other service)
Please keep first set of 5 Participant in the ArrayList
class Participants
{
private int pId;
private String pName;
private int meetingId;
}
http://localhost:8100/participants - GET – all participants
http://localhost:8100/participant/101 - GET – participant 101