Final Exam: ESE 124

Prof. A. Doboli

Spring 2020

C代写 Use a Finite State Machine (FSM) to solve the following problem: You are asked to design the following 4-number sequence detector.

C代写
C代写

Each exercise is 100 points.C代写

1) Use a Finite State Machine (FSM) to solve the following problem:

  • You are asked to design the following 4-number sequence detector. A sequence detector receives integers at its input, one integer at a time. Inputs are either integer 0 or integer 1.
  • For each 4 integers that are input, the FSM needs to see whether they match one of two given sequences: 1 0 1 0, or 0 1 1 0.
  • The FSM outputs are 1 (integer) if either one of the two sequences was found. Otherwise, the FSM outputs a 0 (integer).
  • Overlapping sequences are accepted, e.g., 1 0 1 0 1 0 will produce the output 0 0 0 1 0 1. The integers are input one at a time, so we can’t see all 4 integers at once.

2) Write the following program:

Use struct data type to store information about a neighborhood.C代写

Every house in the neighborhood is characterized by the following information: 1) Street name(string up to 20 characters); 2) the number of the house as used in the address (integer); 3) Listed price (float); and 4) the number of months since the house was purchased by the current owner (integer).C代写

– The information about the individual houses is read from an input file.

– Store the information about all houses in an array, and then display the content of the array.

– Order the houses in the decreasing order of their listed prices, and then display the houses in this order.

– A house is more likely to be sold if it has a lower listed price and also a higher number of years since it was purchased by the current owner. The formula describing the likelihood of a house to be sold is the following: Likelihood = 0.5 x 1 / Listed price (in tens of thousands) + 0.5 x  number of months since purchase. Order the houses in decreasing order of their likelihood of being sold by the current owner.

– Assume that a buyer has $Y dollars for purchasing houses in the neighborhood. Devise an algorithm, so that the buyer focuses on purchasing the houses that are most likely to be sold, and which he can buy with the $Y dollars that he has. Your program should list the identified houses.

Note: Extra credit is given if dynamic data structures are used.C代写

3) Use a stack to order a sequence of integer numbers in decreasing order of their values.C代写

The integer values are read one by one from the keyboard. Numbers are read until the user inputs the value 0. Then, the input values are displayed in decreasing order.C代写

C代写
C代写

 

 

更多其他: 代写下单   代写CS  C语言代写  文学论文代写

合作平台:天才代写 幽灵代写  写手招聘

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

 
QQ在线咨询
售前咨询热线
QQ:3554475127
售后咨询热线
QQ:3042439236