完不成程序作业该怎么办？可以找programming代写老师帮忙吗？ programming程序代写 相信很多在国外留学的同学，对国外的专业考试和作业有着莫名的紧张感和无力感，因为对当地文化不是很了解。和老师同学沟通...View details
ESE 124 (Programming Fundamentals)
Final exam review
编程基础代写 A.Sample exam questions 1) Write the following program: Use struct data type to store information about courses. Every course is characterized by
A.Sample exam questions 编程基础代写
Write the following program: Use struct data type to store information about courses. Every course is characterized by the following information: 1) Title (up to 20 characters); 2) Number of credits (integer); 3) Instructor (up to 15 characters); and 4) the suggested order of the course in the course sequence of the major (integer; Two courses can have the same suggested order).
– The information about individual courses is read from an input file.
– Store the information about all courses in an array and then display the content of the array.
– Order the courses in the alphabetical order of their titles and then display all the courses.
– Order the courses in the suggested order of the courses, such that one course with a lower suggested order is always before a course with a higher suggested order. Assuming that a student cannot take more than X credits per year (the value X is read from the keyboard), display what courses a student should take every year, so that courses are following the suggested order and the number of credits per year does not exceed the limit X. 编程基础代写
– Note: Extra credit is given if dynamic data structures are used.
Use a Finite State Machine (FSM) to solve the following problem: A sequence detector receives integers at its input, one integer at a time. The FSM outputs a 1 (integer) only if among the last three inputs exactly two were odd numbers. Otherwise, the FSM outputs a 0 (integer).
Use a stack to order a sequence of floating point numbers in increasing order of their values. The values are read one by one from the keyboard. Every new number is saved in the stack. Numbers are read until the user enters ‘#’. Then, the values stored in the stack are displayed in the desired order.
B. More practice questions 编程基础代写
1.Problems related to FSM
i. Solve the FSM examples presented at the following link:
ii. Solve the FSM examples presented at the following link:
iii. Solve the FSM examples at the following link:
2.Problems related to stacks
i. We have two different kinds of Ferry Boats and Cars that want to get on board of them. One Boat will work like a Stack and one like a Queue. The Cars don’t choose in which Ferry Boat they want to go in (the text file remains the same tho!). The Cars will first go into Boat S, move into Boat Q and then finish their Sailing! 编程基础代写
Our Boats will contain the following:
- the capacity (to check if the Boats are full)
- the sailing number (to write into files)
- the number of elements inserted
- a Top Node Pointer for the Stack and a Front and Rear Node Pointer for the Queue
The Cars will be a part of a text file called cars.txt (we will get the name as input) and this file will contain the car_id and the boat preference (that doesn’t matter here) like this:
The program will: 编程基础代写
- get the capacity of each boat and the file name as user input
- initialize the boats
- start reading from the file and then manage the sailings
- the cars will first get into Boat S, be written into file when S is full, moved into Q where it fills up, until S is empty and gets written into a file as well when it gets full (can be more times then S, when for example S has capacity of 2 and Q of 1)
- the reading loop will stop when there are no more cars in the file
- then we will check if there are some remainders in the Boats to write them in a “sailing” file aswell
The Stack-Queue Functions need to be Functions that are called from the main function!
ii. Solve the stack related exercises at the link:
3.Problems related to dynamic memory, structures and sorting
- Solve the exercises at the following link: http://www.cs.princeton.edu/courses/archive/fall02/cos126/exercises/structs.html
- Solve the exercises at the end of the notes from following link: