Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this assignment ASAP undefined Create a class Project with below attributes: projectld - int projName - String projCost - double technology1

I need help with this assignment ASAP

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedundefined

Create a class Project with below attributes: projectld - int projName - String projCost - double technology1 - String technology2 - String technology - String Write getters, setters and parameterized constructor in the above mentioned attribute sequence as required. Create class Solution with main method. Implement two static methods - find ProjsCountForGiven Tech and get ProjectWith MaxCost in Solution class. find ProjsCountForGiven Tech method: This method will take two input parameters - Array of Project objects and a String parameter. The method will return the count of the projects using the technology, which is passed as a String parameter If the given technology is not present in the array of Project objects, then the method should return 0. getProjectWithMaxCost method: This method will take the Array of project objects. The method will return the project object, which contain the maximum project cost Note: No two projects have the same project cost. All the searches should be case insensitive. The above mentioned static methods should be called from the main method. For findProjsCountForGiven Tech method - The main method should print the count as it is if the returned value is greater than 0. If the returned count is 0, then the main method should print "No Projects with the given Technology": For getProjectWith MaxCost method - The main method should print the projectld and projectName of the returned Project object if the returned value is not null. The projectid and projectName should be concatenated with @ while printing. eg:- 3@Pharma, where 3 is the projectld and Pharma is the project name. If the returned value is null then main method should print "No Projects". Before calling these static methods in main, use Scanner object to read the values of four Project objects referring attributes in the above mentioned attribute sequence. Next read a String value for capturing technology Consider below sample input and output: Input: 1 Banking 100000 C C++ Java 2 Finance 300000 C C++ Finance 300000 C++ Java 3 Pharma 900000 HTML JavaScript CSS 4 Transport 500000 Dot Net ASP MSSQL java Output: 2 3@Pharma Sample code snippet for reference: ************************************* Please use below code to build your solution. import java.util.Scanner; public class Solution { public static void main(String[] args) 3@Pharma Sample code snippet for reference: ***** ****************** **** Please use below code to build your solution. import java.util.Scanner; public class Solution public static void main(String[] args) { //code to read values // Have your own code to call required method // Have your own code to display the result public static int find ProjsCountForGiven Tech(/* required parameters to be added */) { I/method logic public static Project getProjectWithMaxCost(/* required parameters to be added */) { 1/method logic } } class Project { // code to build the class

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Which are non projected Teaching aids in advance learning system?

Answered: 1 week ago

Question

=+2 Why are so many countries bothered by their brain drains?

Answered: 1 week ago