Question: IN JAVA The GenEd Class the attributes String code String description int requiredCredits two constructors one complete with all parameters, one for each attribute one
IN JAVA
The GenEd Class
- the attributes
- String code
- String description
- int requiredCredits
- two constructors
- one complete with all parameters, one for each attribute
- one with no parameters
- the default values should be
- "None Available"
- "N/A"
- 0
- the default values should be
- a toString() method that will display information formatted as below:
- description + one space + ( + code + ) + credits
- for instance:
- Writing Speaking (GWS) 3
- Quantification (GQ) 3
- the get/set methods
- The set method for description
- public void setDescription(String description)
- will need to check and correct if needed the input data
- We will have two versions of this requirement. One simpler and one more complicated that will get you an extra point.
- simple
- The String has to have the first letter in upper case and the remaining of the word in lower case
- for instance, if the input is: "SOCIAL and behavioral sciences"
- the output has to be: "Social and behavioral sciences
- complex(for extra point only)
- Each word in the String have to have the first letter in upper case and the remaining of the word in lower case
- for instance, if the input is: "SOCIAL and behavioral sciences"
- the output has to be: "Social And Behavioral Sciences"
- simple
- The set method for description
The app class
- create 10 GenEd objects with the data below
- "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
- display each object using the toString( ) method.
- create a GenEd object using the default constructor
- display the object's data using the toString( ) method
- create a GenEd object with the following data
- tEST this sENTENCE
- N/A
- 3
- display its data
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
