Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have to create an application that can query classes as shown. How would I go about doing this? My other two classes are below.

image text in transcribed

I have to create an application that can query classes as shown. How would I go about doing this? My other two classes are below.

image text in transcribed

image text in transcribedimage text in transcribed

Thank you so much in advance.

1. Search by Course Name 2. Search by Course Number COP1000 Principles of Programming; Spring in 2019 COP2800 Java Programming; Spring in 2019 3. Search by Term CGS2545 Database Management; Spring in 2019 4. Search by Year CIS2901 Case Study: Spring in 2019 5. Quit CGS2100 Office Applications; Spring in 2019 3 COP1000 Principles of Programming: Spring in 2020 Enter all or part of term to COP2800 Java Programming; Spring in 2020 search for CGS2545 Database Management: Spring in 2020 s -> Spring; f -> Fall;r-> CIS2901 Case Study; Spring in 2020 Summers CGS2100 Office Applications, Spring in 2020 COP1000 Principles of Programming; Spring in 2019 1. Search by Course Name COP1000 Principles of Programming: Summer in 2019 2. Search by Course Number COP1000 Principles of Programming; Fall in 2019 3. Search by Term COP2800 Java Programming; Spring in 2019 4. Search by Year COP2800 Java Programming; Summer in 2019 5. Quit COP2800 Java Programming; Fall in 2019 1 COP1000 Principles of Programming; Spring in 2020 Enter all or part of course COP1000 Principles of Programming; Summer in 2020 COP1000 Principles of Programming; Fall in 2020 name to search for: COP2800 Java Programming; Spring in 2020 prog COP2800 Java Programming; Summer in 2020 COP2800 Java Programming; Fall in 2020 1. Search by Course Name 2. Search by Course Number COP1000 Principles of Programming; Spring in 2019 3. Search by Term COP1000 Principles of Programming; Summer in 2019 4. Search by Year 5. Quit COP1000 Principles of Programming; Fall in 2019 COP1000 Principles of Programming; Spring in 2020 2 COP1000 Principles of Programming; Summer in 2020 Enter all or part of course COP1000 Principles of Programming; Fall in 2020 number to search for: 1000 COP1000 Principles of Programming; Spring in 2020 COP1000 Principles of Programming; Summer in 2020 COP1000 Principles of Programming; Fall in 2020 1. Search by Course Name COP2800 Java Programming; Spring in 2020 2. Search by Course Number COP2800 Java Programming; Summer in 2020 COP2800 Java Programming; Fall in 2020 3. Search by Term CGS2545 Database Management; Spring in 2020 4. Search by Year CGS2545 Database Management; Summer in 2020 5. Quit CGS2545 Database Management: Fall in 2020 4 CIS2901 Case Study: Summer in 2020 Enter year to search for CIS2901 Case Study: Spring in 2020 public final class CourseSchedule { public static final Course[] COURSE_ARRAY = { new Course("Principles of Programming", "COP1000", Course.SPRING, 2019), new Course("Principles of Programming", "COP1000", Course, SUMMER, 2019), new Course("Principles of Programming", "COP1000", Course, FALL, 2019), new Course("Java Programming", "COP2800", course. SPRING, 2019), new Course ("Java Programming", "COP2800", Course. SUMMER, 2019), new Course ("Java Programming", "COP2800", Course FALL, 2019), new Course("Database Management", "CGS2545", course. SPRING, 2019), new Course ("Database Management", "CGS2545", course. SUMMER, 2019), new Course("Database Management", "CGS2545", course, FALL, 2019), new Course ("Case Study", "CIS2901", Course. SUMMER, 2019), new Course ("Case Study", "CIS2901", Course. SPRING, 2019), new Course ("Case Study", "CIS2901", Course.FALL, 2019), new Course("Office Applications", "CGS2100", Course, FALL, 2019), new Course("office Applications", "CGS2100", course, SPRING, 2019), new Course ("Office Applications", "CGS2100", Courses SUMMER, 2019) new Course("Principles of Programming", "COP1000", Course. SPRING, 2020), new Course("Principles of Programming", "COP1000", course, SUMMER, 2020), new Course("Principles of Programming", "COP1000", course, FALL, 2020), new Course("Java Programming", "COP2800", Course.SPRING, 2020), new Course ("Java Programming", "COP 2800", Course. SUMMER, 2020), new Course ("Java Programming", "COP 2800", Course FALL, 2020), new Course("Database Management", "CGS2545", course, SPRING, 2020), new Course ("Database Management", "CGS2545", Course. SUMMER, 2020), new Course ("Database Management", "CGS2545", Course, FALL, 2020), new Course ("Case Study", "CIS2901", Course. SUMMER, 2020), new Course("Case Study", "CIS2901", Course. SPRING, 2020), new Course ("Case Study", "CIS2901", Course.FALL, 2020), new Course("Office Applications", "CGS2100", course, FALL, 2020), new Course("Office Applications", "CGS2100", Course, SPRING, 2020), new Course ("Office Applications", "CGS2100", Course. SUMMER, 2020) }; private CourseSchedule () { } } class Main { public static void main(String[] args) { } } class Course { public final char SPRING ='s'; final public char SUMMER ='r'; final public char FALL ='f'; private String courseName; private String courseNumber; private char termoffered; private int yearoffered; Course(String newCourseName, String newCourseNumber, char newTermoffered, fint newYearoffered) { this.courseName=newCourseName; this.courseNumber=newCourseNumber; this.termoffered=newTermoffered; this.yearoffered=newYearoffered; } public String getCourseName() { return courseName; } public void setCourseName (String courseName) { this.courseName = courseName; } public String getCourseNumber() { return courseNumber; } public void setCourseNumber (String courseNumber) { this.courseNumber = courseNumber; } public char getTermoffered) { return termoffered; } public void setTermoffered (char termoffered) { this.termoffered = termoffered; } public void setYearoffered (int yearoffered) { this.yearoffered = yearoffered; } public String getTermofferedByName() { switch(getTermoffered()) { case 's': return "Spring"; case 'r': return "Summer"; default: return "Fall"; } } public String toString() { return courseNumber+" "+courseName+" ("+yearoffered+" "+getTermofferedByName()+")

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

Recommended Textbook for

Practical Oracle8I Building Efficient Databases

Authors: Jonathan Lewis

1st Edition

0201715848, 978-0201715842

More Books

Students also viewed these Databases questions