Question: Please write this code in Java and place comments where necessary to understand. Also, please comment the classes etc. Please complete everything. Please do the
Please write this code in Java and place comments where necessary to understand. Also, please comment the classes etc. Please complete everything. Please do the calculations and the methods as well. If not able to give the specific part of code please give an example of what the code should resemble. Please provide a suitable format for the output. Please provide methods to: list unique values for each column, delete an object, add an object and input data for each objects variable, generate report answering specific questionswhich are found below and calculate statistics on columnsmean median, standard deviation And a driver. If there should be constructors in the Cell class please add it as well.For this project, you will read in a CSV file that has statistics for cell phones. You will then create a class called Cell and assign the column as class attributes. Create getter and setter methods. The objects will be stored in a data structure native to the language. You are free to pick what your data structure is but if your language has a HashMap type data structure, I strongly encourage you using itData Ingestion and CleaningYou must perform transformations on the data as it comes in or after it is been ingested. This a process called data cleaning and these are the steps:Replace all missing or values with null or something similar that can be ignored during calculationsTransform data in appropriate columns according to instructions. For example in the bodyweight column, a typical value is g oz and needs to be converted to Convert data types in appropriate columnsNote: Be aware: a null value can look very different in different languages. Research how your language represents null values and use what makes most sense. Below, it says to watch out for invalid or missing values. Check the specifications below about valid and invalid data. The most important part of the invalid data transformation in this is that for any column that expects a number as a final result, it should all be numbers that statistical analysis can be performed onHere are the columns which will be class variables:Column NameData TypeDescriptionNotesoemStringCompany phone comes fromWatch out for missing values, replace with null Valid data: a String composed of letters or numbers.Invalid data: Nothing is invalid here.modelStringModel of PhoneWatch out for missing values, replace with nullValid data: a String composed of letters or numbers.Invalid data: Nothing is invalid here.launchannouncedString IntegerYear of launch announcedThis one will start as string but needs to be transformed to only contain the integer year. If your programming language supports using regex, it would be helpful here. Any invalid values without a year such as V need to replaced with a null value.Valid data: A string that has a year in it composed of digits.Invalid data: Any string that does not have a year in it composed of digits.launchstatusStringYear of launchThis one will start as string but needs to be transformed to only contain the integer year. If your programming language supports using regex, it would be helpful here. If you have a result that is 'Discontinued' or 'Cancelled', leave it as is This will create an issue with mathematical calculations, leaving all as strings. You will have to figure out how to do the calculation with the numeric types only.Valid data: A string that has a year in it composed of digits or the string 'Discontinued' or 'Cancelled'.Invalid data: Any string that does not have a year in it composed of digits or is not the string 'Discontinued' or 'Cancelled'.bodydimensionsStringDimensions of the phone's bodyWatch out for invalid or missing values, replace with nullValid data: a String composed of letters or numbers.Invalid data: Nothing is invalid here.bodyweightString FloatWeight of phone's bodyThis one will start as string but needs to be transformed to an float, have only the number of the grams listed. If your programming language supports using regex, it would be helpful here.Valid data: A string that has an integer in it before the letter g such as g ozInvalid data: Any string that does not have an integer in it before the letter g such as just a hyphen or just a number such as bodysimStringType of sim cardBe aware of possible No values or oddities. Replace these with null.Valid data: a String composed of letters.Invalid data: The word No or "Yes"displaytypeStringType of displayWatch out for missing values, replace with nullValid data: a String composed of letters or numbers.Invalid data: Nothing is invalid here.displaysizeString FloatSize of display in inchesWill start as string, transform to float in inches. May need to replace missing or invalid values with null values. If your programming language supports using regex, it would be helpful here.Valid data: a String composed of an integer or a float before the word "inches" with anything after itInvalid data: Just an integer or a float such as or displayresolutionStringResolution of displayWatch out for missing values, replace with nullValid data: a String composed of letters or numbers.Invalid data: Nothing is invalid here.featuressensorsStringAny features that are sensorsWatch out for invalid or missing values, replace with null. V is an acceptable value for this one.Valid data: a String composed of letters or numbers.Invalid data: Only a number such as or platformosStringPlatform of the operating system of the phoneWatch out for invalid of missing values, replace with null. Shorten this down to just the name. So if you see something like "Android Pie upgradable to Android shorten it to "Android Pie If your programming language supports using regex, it would be helpful here. The idea here is to get everything up to the first comma or if there is no comma, to get everything in the string.Valid data: a String composed of letters or numbers.Invalid data: Only a number such as or MethodsWithin each class, you will create a series of methods that will perform operations on the new objects. There must be at least methodsfunctions in your Cell class, not including getter and setter methods or the methods you use for transformation. Be creative and think critically, its your choice on what these are. Some ideas:ToString method that will convert your objects details to a string for printing.Calculate statistics on columns, for numeric, descriptive stats such as mean, median, standard deviation, etc. For categorical columns, perhaps Mode or count of unique values.Listing of unique values for each column.Ability to add an object and input data for each object's variable.Ability to delete an object.ExceptionsEnsure that you have exceptions that can handle errors. Focus on input validation. You do not need to validate everything, but have a robust number of exception handling in your project to show you are making your program secure and able to survive poor user input.TestingIf your programming language has unit testing capability such as junit or pyunit, use that for your unit tests. If not, write your own unit tests for each method. On top of a unit test for each method, there are three tests you are required to have:Ensure the file being read is not empty.Ensure each column's final transformation matches what is stated above as its final form ex: test if displaysize is now a floatEnsure all missing or data is replaced with a null value.ReportPlease include a README.md file with your repo that will serve as a survey of your explored programming language. Within it discuss several things in a few paragraphs:Which programming language and version did you pick?Why did you pick this programming language?How your programming language chosen handles: objectoriented programming, file ingestion, conditional statements, assignment statements, loops, subprograms functionsmethods unit testing and exception handling. If one or more of these are not supported by your programming language, indicate it as soList out libraries you used from your programming language if applicable and explain what they are, why you chose them and what you used them for.Answer the following questions and provide a corresponding screen showing output answering them:What company oem has the highest average weight of the phone body?Was there any phones that were announced in one year and released in another? What are they? Give me the oem and models.How many phones have only one feature sensorWhat year had the most phones launched in any year later than Some other items of importanceYou are required to use Github for this project. You will be submitting your Github repo link on Canvas. I expect to see a commit history as you worked on this project. Feel free to use whatever IDE to connect to Github or use the command line.Be sure your code is clean, legible and easy to read.Feel free to go above and beyond! Add new methods and functionality, test in different ways in addition to what you are required to do be creative! The top grades go to those who go above and beyond. Strive for excellence.Including the runtime as a comment on algorithms with loops in them will be seen as going above and beyond as well.Format RequirementsPlease ensure you follow the structure as listed above. Use the appropriate environment to create your code and run it Provide reasonable amounts of comments, explaining your code.Your submissions will be by providing a link to your repo.For your README.md report, be as professional as possible. I am not putting direct limitations on its length.One Process of Steps to CompleteHere are some general steps you will want to take. This project is all about research and selflearning. These steps are NOT guaranteed to be the optimal way to complete this but is offered for those who are feeling a bit lost and want some structured guidanceResearch how to read in a file in your language. Write the code to read in the CSV file. Write a statement to print it outNow you need to look up how to iterate through the rows of a file and its columns. Find out how to do this with a loop. Create a loop that does thisNow you need to come up with a design for your objectoriented part. First, you will need to look and see how your language programs handle OOPCreate a class called Cell now. Create class attributes for each one of the column names, as it says in the instructionsCreate getter and setter methods for each of the attributesYou will now need to create an object for each row. Each object will have those attributes you created. These objects should be created as you read in the fileAccording to the instructions, you are required to use a data structure to store the objects with it being a recommendation of HashmapSo your data structure, if a hashmap, will have an index identifying it your choice, perhaps an integer index. It must be unique. The value will be the object of that row itself with its attributesAs you are creating objects for your rows and putting them into the data structure, you will create the programming logic that transforms them to clean the data. See the table in the instructions. Examples would be to check if its null or empty and if it is you replace it with something. Another example is you will have to transform the string somehow, I suggest using something like a substring function to do thisOnce you get all the objects in the data structure and they are clean, you will create the additional methods for your class. See the instructionsTo answer the final questions you will have to add methods to your code to find the answers or add code that looks through your work and figures it outNext, you create the required unit testsNow, you will work on the report. Answer the questions.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
