Need help with a tough assignment?
Tell us about your project and we will find the best writer for your paper
GET WRITING HELP NOW!
Description
you will create a new class, GenEdData, that will have an array with all the general education requirements, and some methods to add functionality to the class.
Classes
Lab Description
The GenEdData Class
- One constructor
- with no parameters
- Creates an Array [ ] of GenEd objects
- Create 9 objects and add them to the array using the following data
- with no parameters
"Writing Speaking", "GWS", 3 "Quantification", "GQ",3 "Arts", "GA",3 "Humanities", "GH",3 "Health and Wellness", "GHW",3 "Natural Sciences", "GN",3 "Social and Behavioral Sciences", "GS",3 "United States Cultures", "US",3 "International Cultures", "IL",3 "Writing Across the Curriculum", "WAC",3
- The methods
- public boolean contains(String s)
- checks if the String is contained either in the code or the description of the GenEd objects in the array
- for instance, “Sciences” will return true for the objects below
- “Natural Sciences”, “GN”,3
- “Social and Behavioral Sciences”, “GS”,3
- It returns true if the String s is contained in the array
- it returns false if the String s is not contained in the array
- public boolean contains(String s)
-
- public GenEd find(String s)
- checks if the String matches either the code or the description of the GenEd objects in the array
- for instance, “Natural Sciences” (a description) or “GS” (a code) will return true for the objects below
- “Natural Sciences”, “GN”,3
- “Social and Behavioral Sciences”, “GS”,3
- It returns the GenEd object if the String s matches an element in the array
- it returns null if the String s does not match an element in the array
- public GenEd find(String s)
The app class
- create one GenEdData object
- Test the contains method in the GenEdData object using the data below
- Writing
- writing
- The possible messages are
- if the method returns true, display “input string ” is on the GenEd Table
- if the method returns false, display “input string ” is NOT on the GenEd Table
- Test the find method in the GenEdData object using the data below
-
- abcd
- GHW
- International Cultures
- The possible messages are
- use toString to display the data from the object that was returned by the method
- If the returned object is null, display “input string ” is NOT on the GenEd Table
-
Other Classes
- GenEd: same as in previous assignments.
Output
The output should be similar to
Writing is on the GenEd Table writing is NOT on the GenEd Table abcd is NOT on the GenEd Table Health And Wellness (GHW) 3 International Cultures (IL) 3
The post Ohio State University Java Arrays Worksheet appeared first on Paper Answers.
From essays to dissertations, we deliver on time, every time.
Welcome to SpeedyWritings.com, your trusted online essay writing company providing customized papers for both businesses and students. Our team is dedicated to delivering timely and exceptional academic solutions, ranging from essays to dissertations. At SpeedyWritings.com, we specialize in assisting university students in submitting their best possible essays. Our comprehensive range of services is designed to ensure the production of high-quality university essays, all at affordable rates. Whether you require assistance with any of the following services, we are here to help you.