Hi! everyone

I'm starting out in programming,I need a pseudocode or flowcharting to use to help me get started on coding(JavaScript and HTML). Often, when I take a look at a coding assignment, it looks daunting, and it's hard to figure out exactly where to start. Especially with all of that specific code syntax.I need a Pseudocode that will let me focus on the algorithm - the problem solving technique - without letting the actual code syntax get in the way.For the following program that I want to design
I want a Pseudocode to design the logic for a program that creates student records for Creighton Technical College and assigns an advisor and a dormitory to each student. The program asks users for their first name, last name, birth date (month, day, and year), and intended major. Advisors are assigned based on major, as follows:

Major Advisor Last Name
Business Brown for the first 100 students, then Davis
Computer Information Systems Cunningham for the first 100 students, then Lee
Heating and Air Conditioning Parke
Hospitality Hunter
Undeclared Ulster

Dormitories are assigned based on both major and age, as follows:

Major Age Dormitory
Business under 21 Washington
Business 21 and over Adams
Computer Information Systems under 21 Jefferson
Computer Information Systems 21 and over Lincoln
Heating and Air Conditioning any Grant
Hospitality or Undeclared any Wilson

Perform as many validation checks as you can think of to make sure that complete and accurate records are created.

a. Draw the hierarchy chart.
b. Write the pseudocode3

Eager Student

Recommended Answers

All 4 Replies

Not really easy what you are trying to do!!!

As far I understand you whant to create html document which will work on javascript???

But have do you whant to do this part???
Business Brown for the first 100 students, then Davis
Computer Information Systems Cunningham for the first 100 students, then Lee

There are two options to do this
1. cheat, the way you just count people going for this courses and not to hold any info on them
So person apply for Business, check variable which holds value for amount of people which already registered for this option, if less than 100 send it to Brown else it is more than 100 goes to Davis, in both cases increase by one after all
2. build txt file which will work for you as database, this is more complicated you have to build algoritmus which is able to read/write database and then another algoritmus which will check how many students already on course and make decision where to send a new student

So what do you want to do??? :?:

Hey!! Peter
Can you give the Psuedocode of your idea : 1. cheat, the way you just count people going for this courses and not to hold any info on them
So person apply for Business, check variable which holds value for amount of people which already registered for this option, if less than 100 send it to Brown else it is more than 100 goes to Davis, in both cases increase by one after all 2. build txt file which will work for you as database, this is more complicated you have to build algoritmus which is able to read/write database and then another algoritmus which will check how many students already on course and make decision where to send a new student.Thank you

Eager Student you are realy eager or to lazy
I will not do second one it is complicated as far I judge by demand.

Well so 1st
You have to build up some kind of form which will take all detailes and have classic RESET button and SUBMIT/CHECK button. Design of form is really by your taste checkboxes, radio, input fields, options that is your bussiness.

Than in java script declare your function/-s
Declare variables which will keep values for students for BUSSINESS & IT to know how many of them been registered. However this will keep them as long you do not refresh or close page.
You have to also declare variables which will hold temporary values ADVISOR and DORMITORY which will be displayed somewhere

if(selected BUSSINESS)
        check variable for bussiness
                if under 100 goes to Brown
                else Davis
        check age(DOB against current date)
                if under 21 Washington
                else Adams
if(selected IT)
        check variable for it
                 if under 100 goes to Cunnigham
                 else Lee
        check age
                 if under 21 Jefferson
                 else Lincoln
if(selected HEATING)
            goes to Parke
            accomodation Grant
else                      <that mean HOSPITALITY or UNDECLARE>
                  if(HOSPITALITY)
                           goes to Hunter
                  else
                           goes to Ulster
          bouth of this dormitory Wilson


Than display what you found about student

as alert message if you do not have fields where to dispaly
or
display in predesigned fields

Well, Peter your pseudocode has given me a clear direction.I'm going to create the pseudocode for the second one and the coding as well.Lastly to me this thing does not seem to hard to do and I can give you the url after I have implemented both options of pseudocode as to see what I meant by "your pseudocode has given me a clear direction".Thank you very much for your help.

Eager Student

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.