pharaoh fortune slot
ExamNotes.net
Welcome, Guest. Please login or register.
November 23, 2017, 02:30:07 PM

Login with username, password and session length
* Home Help Search Login Register
+  ExamNotes.net
|-+  General discussions
| |-+  Programming Forum
| | |-+  can sumone help me.. pls..
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: can sumone help me.. pls..  (Read 1807 times)
sshahry
Junior Member

Offline Offline

Posts: 1

0


View Profile
« on: August 13, 2005, 12:27:55 PM »

i am trying to code this program given by my lecturer.. it's a pretty tough program for me because i have no background in programming at all and I hope you guys can help me here.. here is the question, pls help me with the solution.. and also wat does a pseudocode mean..? thank u..:

A university has two campuses: Campus A and Campus B. The lists of the teaching staff in each campus are kept in text files (staff_listA.txt for Campus A and staff_listB.txt for Campus B), with each line representing information about one staff. The Human Resource Department wants to have only one list showing information about all staff in both campuses. Therefore the two text files must be combined/merged into a single text file (teaching_staff.txt) which has the Name filed in alphabetical order.

Write a C program to merge the two files to produce a combined file. After creating the combined file the program must be capable of listing the details of the professors, senior lecturers or lecturers (depending on the user selection) with the Name field in alphabetical order. The program should display the following menu to the user for them to select one of the four options listed.

Sample Menu:
      -------------------------
           MAIN MENU
                        ------------------------
1.   TO LIST PROFESSORS
2.   TO LIST SENIOR LECTURERS
3.   TO LIST LECTURERS
4.   TO EXIT
---------------------------
                Please enter your option <1/2/3/4>:


Sample data for staff_listA.txt file (sorted on Name field):
 
Name   ID No.   Qualification   Designation
Abraham   1001   PhD   Professor
Clinton   1003   ME   Senior Lecturer
Ibrahim   1005   ME   Lecturer

Sample data for staff_listB.txt file (sorted on Name field):
 
Name   ID No.   Qualification   Designation
Brain   1002   PhD   Professor
Kim   1004   ME   Senior Lecturer
Nelson   1006   ME   Lecturer
Logged
TheShadow
Member
Jr. Member
**
Offline Offline

Posts: 72

0


View Profile
« Reply #1 on: August 13, 2005, 10:51:15 PM »

if you have no background in programming maybe you should be taking an intro to programming class.  If this is what your class is then you are missing some reading that you should have done or a lecture that you should have attended.  

Asking someone to do your homework without showing what you have attempted on your own is bad form mate.  You haven't even bothered to tell us what programming language you are trying to learn.

People become programmers by writing programs, there is no shortcut.  

Here is a pointer to both a definition of pseudocode and  pseudocode for a bubble sort.
http://www.webopedia.com/TERM/P/pseudocode.html

update: re-reading your message I see that it is to be a C program.  Simple sorts are in every C programming book that I have ever read ove the last 20+ years starting with the original K&R.  This tells me you need to re-examine if this is a path that you wish to go down.
« Last Edit: August 13, 2005, 11:00:00 PM by TheShadow » Logged
ash.h
Junior Member

Offline Offline

Posts: 1

0


View Profile
« Reply #2 on: August 16, 2005, 10:02:01 AM »

TheShadow, you're very wrong about sshary. I reckon he's my college mate because i have the same assignment to do as well. We're NOT IT students, instead we're engineering students taking a 3-credit-hour programming subject. We've barely gone through 2 months of lectures. Do the math, we've only attended 8x3=24 hours of lectures. The latest topic we've covered so far is funtions. So please be careful before you judge.
Logged
TheShadow
Member
Jr. Member
**
Offline Offline

Posts: 72

0


View Profile
« Reply #3 on: August 16, 2005, 12:34:10 PM »

Little sympathy here, I did an engineering degree long before the INTERNET existed and my first programming course was FORTRAN as a math course.  For C I was told here is the book, K&R, read it. My message stands and if you think I am harsh try asking the same message in the Usenet C newsgroup. On fidonet I along with Bob Stout and others answered many Newbee questions on a daily basis for years so I am not without feeling.  Many people consider programmers an unkind lot but there is a reason.

Programming is like learning to drive a automobile, no one can tell you how to do it.  You learn by writing programs. I have generated over 1 million lines of commercial C code with international registered copyrights (1MLoc) and more in other languages.  What you see as cruel is good advice that many programmers will provide. It is the way that I learned and the way that most of my colleagues learned.

I answered his question on pseudocode.  Please take note that none have jumped forward yet to do his or your homework. Maybe someone still will who knows. Now if he had posted his work and asked what is wrong my response would have been different. Engineering is about finding solutions and not about asking others to find those solutions without effort from you. The pseudocode pointer took 30 seconds to find which was less time than it took to type the response. Google is your friend, wish I had it all those years ago. Or you could ignore this message and consider me old and evil; your choice.

Cheers :cool:
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!