Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

  1. the attributes
    1. String code
    2. String description
    3. int requiredCredits
  2. 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
  3. a toString() method that will display information formatted as below:
    • description + one space + ( + code + ) + credits
    • for instance:
      • Writing Speaking (GWS) 3
      • Quantification (GQ) 3
  4. the get/set methods
    1. The set method for description
      1. public void setDescription(String description)
      2. will need to check and correct if needed the input data
      3. We will have two versions of this requirement. One simpler and one more complicated that will get you an extra point.
        1. simple
          1. The String has to have the first letter in upper case and the remaining of the word in lower case
          2. for instance, if the input is: "SOCIAL and behavioral sciences"
          3. the output has to be: "Social and behavioral sciences
        2. complex(for extra point only)
          1. Each word in the String have to have the first letter in upper case and the remaining of the word in lower case
          2. for instance, if the input is: "SOCIAL and behavioral sciences"
          3. the output has to be: "Social And Behavioral Sciences"

The app class

  1. 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
  2. display each object using the toString( ) method.
  3. create a GenEd object using the default constructor
  4. display the object's data using the toString( ) method
  5. create a GenEd object with the following data
    1. tEST this sENTENCE
    2. N/A
    3. 3
  6. display its data

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

How would you respond to each of the girls?

Answered: 1 week ago

Question

Explain the causes of indiscipline.

Answered: 1 week ago