Auto Advisor Many a job has fallen to the mighty forces of automation. In fact, I could tell you harrowing tales of when

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899559
Joined: Mon Aug 02, 2021 8:13 am

Auto Advisor Many a job has fallen to the mighty forces of automation. In fact, I could tell you harrowing tales of when

Post by answerhappygod »

Auto Advisor
Many a job has fallen to the mighty forces of automation. In
fact, I could tell you harrowing tales of when my own code has
ousted entire departments of workers. Well, I am not immune to such
things. In this section, you will automate one of my several job
functions. You will create a program which can advise students
about their overall academic performance, and make recommendations
about what courses they can take next.
To support this, we will create a data file for each student
based on their major. The format of this file has each required
course or category organized into records. There is one record per
line, and they are delimited with “|” symbols. The format of these
records are shown below:
These fields can have any number of characters, and the trailing
or leading spaces of the fields are ignored. The course/category
field is free-form and consist of any combination of characters
other than a “|” or “,”. The credit hours is the number of hours in
the course/category. The grade is a single letter. A blank grade
entry indicates a course has not been attempted, an F means it has
been failed, and any other letter means it has been completed.
The prerequisites are listed in a comma separated list where the
entries match the Course/Category of another record. A comma
separated list are requirements which undergo an “and” operation.
For example, consider the following course:
This entry indicates that CS380 is 3 credit hours long, has not
been attempted, and prior to taking this course a student must
complete CS288 and CS351.
Individual lists of courses can be separated by spaces to
indicate an “or” operation. Take for instance the following:
Here, CS591 requires one of the following conditions to be met:
1. CS300 and CS380 and CS480 2. CS300 and CS503 3. CS500 and
CS503
Putting all this together, the complete requirements to earn a
bachelor of science degree in Computer Science at SEMO is:
Note that some things on this list are not courses. They include
categories, which will be replaced my classes as the student
progresses. They also include entries such as “Senior Standing” and
“ACT24”, which are still conditions that can satisfy a requirement
but are not really courses. These are listed with a 0 credit hour
designation so that they can still work as prerequisites but will
not be included in the computation of GPA.
So then, here is what the program does. It reads in a file and
then prints out the following: 1. The overall GPA of the student,
using the standard scale (A=4, B=3, C=2, D=1, F=0) 2. The number of
credit hours attempted. 3. The number of credit hours completed. 4.
The number of credit hours remaining in the student’s degree. 5. A
list of courses which the student needs, and which can be taken
given the records already in place.
For example, say we took the above file and ran it. This would
be the state of affairs for an incoming freshman. The program’s
output would be as follows:
Of course, some of those are not classes, and perhaps that is
where I can find my job security. (That is, I will still be useful
to tell students that they cannot sign up for a better ACT
grade.)
Now, suppose we ran this on a senior, one who had completed all
their course work. One possible outcome would be something like
this:
Finally, let’s suppose that we have a file of a typical rising
sophomore. It may look something like this:
This would yield the following run:
i need java code
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply