You are required to implement basic social media portal where user can create his profile. You can provide user the options to create new profile, update profile and delete profile as well. Create class Profile having necessary information of user ( ID, Name, gender, age, email, interest, Date of birth) provide appropriate methods. Next create class Portal which uses Node of Profile Class to handle profiles. Next provide methods to:
1) InsertProfile (ID, Name, gender, age, email, interest, Date of birth)// adds new profile to the list.
2) UpdateProfile (int id) which helps user update his profile information)
3) DeleteProfile(string name) delete a particular profile form list
4) searchProfile(string name)
5) Display ()// display all values.
In main create a menu to show following options to user
1) Add new Profile
2) Update Profile ( which helps user update his profile information)
3) Delete a Profile
4) Search Profile
5) Display All
6) Exit.
The program runs until user wants to exit.
Write a class named Mobile that holds data about a mobile in a retail store. The class should have the following member variables:
• Name/brand. A string that holds name of the brand of phone.
• unitsOnHand. An int that holds the number of units currently in inventory.
• price. A double that holds the retail price.
Write a constructor that accepts arguments for each member variable, appropriate functions that store values in these member variables, and accessor functions that return the values in these member variables.
Once you have written the class,
Write another class Store (link list) having Mobile as a node then provide function to insert new mobile in list and to Delete a mobile and to display all mobiles.
Write a main program that shows all the functionality.
Note: you have to implement all scenarios (insert and delete at start, end, in between).
As a new engineer for a traffic congestion mitigation company, you have been tasked with developing a
Java Swing GUI that displays time, traffic signals and other information for traffic analysts. The final GUI
design is up to you but should include viewing ports/panels to display the following components of the
simulation:
1. Current time stamps in 1 second intervals
2. Real-time Traffic light display for three major intersections
3. X, Y positions and speed of up to 3 cars as they traverse each of the 3 intersections
Some of the details of the simulation are up to you but the following guidelines will set the guardrails:
1. The components listed above should run in separate threads.
2. Loop through the simulation with button(s) providing the ability to start, pause, stop and
continue the simulation
Sara loves triangles. Whenever she sees three points she connects them by straight lines to form a triangle. In triangles, her favorite one is a right-angled triangle. If the triangle is not right-angled but it can be converted into one by moving one of the points exactly by distance 1 so, that all the coordinates remain integer, she calls such triangles "Special".
Given three points A, B, and C your task is to check if the formed triangle is "Right", "Special" or "Simpl
Constraints:-
|X|, |Y| <= 10^9
Output
Print "Right" if the triangle is right- angled, print "Special" if the triangle can be formed into a right- angled by moving one of the points exactly by distance 1, else print "Simple".
Example
Sample Input:-
0 0
2 0
0 1
Sample Output:-
Right
Sample Input:-
-1 0
2 0
0 1
Sample Output:-
Special
Sample Input:-
-1 0
2 0
10 10
Sample Output:-
Simple
Sara has guests coming over to her house for dinner. She has a circular dining table of radius R and circular plates of radius r. Now she wonders if her table has enough space for all the guests, considering each guest takes one plate and the plate should lie completely inside the table.
Input
The input contains three space- separated integers N(Number of guests), R, and r.
Constraints:-
1 <= N <= 100
1 <= r, R <= 1000
Output
Print "Yes" if there is enough space, else print "No".
Example
Sample Input:-
4 10 4
Sample Output:-
Yes
Sample Input:-
5 10 4
Sample Output:-
No
You are given 4*N+1 distinct points on the cartesian plane. Out of these points, 4*N points represent the end points of N rectangles (with axis parallel to co-ordinate axis), while one point does not belong to any of the rectangles. Report the coordinates of the point that does not belong to any of the N rectangles
You were assigned to write a program to compute the salary of the company's employees. The cut off period is every 15 days. Given are the data needed for computation.
-employees worked for 8 hours per day for 5 days per week
-daily rate of each employee is php 850 for an entry level employee and 1150 for managerial level employee
- overtime pay is 10% of the base pay computed per hour
-if an employee has had no absences, s/he will be given an additional 20% of her final salary of the said period.
-deductions will be SSS Php 500, PhilHealth 300, Pag-ibig 350, tax of 10%
Get the final salary of the employee.
1 Daphne Bridgerton | 84 | 85 | 100
2 Simon Basset | 100 | 84 | 86
3 Anthony Bridgerton | 75 | 87 | 99
The first column is the Laboratory Exercise, second column is the Long Quiz and 3rd column is the Alternative Assessment
Create a program in Java that will read the CSV file and compute the Final Grade of the student using the computation below:
Lab Exercise * 30% + Long Quiz * 30% + Alternative Assessment * 40% = Final Grade
Then, display the final grade of each student.
sprime
Time Limit: 2 sec
Memory Limit: 128000 kB
Problem Statement
Sara has developed a new algorithm to find sprime for a given range starting with 2
She will start from the end mark it sprime, and mark all its factors (excluding itself) as not sprime. Then she will find the next greatest unmarked number, mark it as sprime, and mark all its factors (excluding itself) as not sprime
Your task is to calculate the the number of sprimes that are actually prime
Input
The first line contains T the number of test cases.
Each of the next T lines contain an integer n.
Constraint:-
1 <= T <= 100
2 <= n <= 10000000
Output
Output T lines, one for each test case, containing the required answer.
Let's define P[i] as the ith Prime Number. Therefore, P[1]=2, P[2]=3, P[3]=5, so on.
Given two integers L, R (L<=R), find the value of P[L]+P[L+1]+P[L+2]...+P[R].
I