Computer Science
OSU Academic Java Programming Academic Project & Course Object Project

Ohio State University

Question Description

I’m studying for my Java class and don’t understand how to answer this. Can you help me study?

The AcademicProgram Class

The AcademicProgram class is what is called a super class.

  1. The attributes (use encapsulation)
    1. String name;
    2. int minimumNumberOfCredits;
    3. ArrayList<Course> requiredCourses;
  2. two constructors
    • one complete with all parameters, one for each attribute
    • one with no parameters
      • the default values should be
        • name - blank String (no spaces)
        • minimumNumberOfCredits - 0
        • requiredCourses - a new ArrayList<Course>
  3. a toString() method that will display information about the object
    • you can use the Netbeans automatic builder format
  4. The "get/set" methods
    • no special requirements.

The app Class

Create and display an AcademicProgram object with 3 courses (see below).

name: "Special Studies in Cyber Security"

minimumNumberOfCredits: 9

courses: 3 Course objects

  1. using the default/no parameter constructor
  2. using these values
    1. name - "Cyber", "100", "h"
    2. genEd - "IL" (the GenEd object returned with the find method in GenEdData)
    3. description - "Computer Systems Literacy"
    4. credits_min_per_course - 3
    5. credits_max_per_course - 9
    6. credits_maximum - 99
    7. preReq - use the default constructor for CourseName
    1. name - "CYBER", "262", ""
    2. genEd - "GS" (the GenEd object returned with the find method in GenEdData)
    3. description - "Cyber-Defense Studio"
    4. credits_min_per_course - 3
    5. credits_max_per_course - 9
    6. credits_maximum - 99
    7. preReq - "Cyber", "100", ""

Displaying

  • display the name and minimumNumberOfCredits
  • display each course in a single line
    • use the special string sequence "\n" to add a new line to the display

Below a sample output (including part of the necessary code in app)

lab06_new_output.png

Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

Final Answer

At...

criss53 (3116)
UCLA

Anonymous
Solid work, thanks.

Anonymous
The tutor was great. I’m satisfied with the service.

Anonymous
Goes above and beyond expectations !

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
Similar Questions
Related Tags