代写程序,程序代写,代做程序,Java/Python/Matlab代写,专注留学生程序代写,提供最专业的代写服务。互联网一线工程师24-48
因为客户隐私需要,部分客户要求不公开的和最新当月的案例不会展示,这里展示的只是我们工作的一小部分典型案例:
AI代写
Algorithm 算法作业
Assembly 汇编作业
C/C++ 编程代写
C#
CS assignment代写
CS作业代写
Data Mining数据挖掘作业代写
Data Structure 代写
Database 数据库作业代写
EE 作业代写
HomeWork cs作业
Java 代写
Lab代写
Linux C/C++ 作业代写
Machine Learning 机器学习作业代写
Multi-threading 多线程作业代写
Network 作业代写
Project代写
Python 作业代写
R语言代写
Web
加拿大程序代写
新加坡程序代写
新西兰程序代写
澳大利亚程序代写
算法作业代写
美国程序代写
英国程序代写
香港程序代写
CS 222:Computer Programming for Engineers
Homework # 4 Rubric
Most computers on the internet have a 32 bit Internet Protocol Version 4
(IPv4) address. As reading these addresses would be difficult using
binary or hexadecimal notation, IPv4 addresses are usually represented
in dotted decimal notation.
For purposes ofrepresentation,the 32 bits composing the address may
be divided intofour octets (bytes) written in decimalnumbers, each
rangingfrom 0 to 255, and concatenatedas a character string with a full
stop (ASCII 46)betweeneach number.
For example:
The first two components of theaddressindicate the computer’s locality
on the network.In theabove example, the locality is specified by the
numbers172 and16.
Anotherexample:
Locally, computers are often known by an alias (nickname) as
well. You will design and write a program to process a list of Internet
addresses from file “CS222_Inet.txt”. Your program should read a list of
up to 100 addresses andnicknames terminated bya sentinel address of
all zeros and the sentinel nickname, “NONE”.
SampleCS222_Inet.txt:
Your program will generate a report listing all computers fromthe same locality---that is, each computer with matchingvalues in the first two components of the address. In the list, the computers should be
identified by their alias. The report will be saved to file
“222_Locality_Report”.As with HW3, the report will contain the user’s
name and current date, along with the generated reportlisting.
Examples: Hal GreenwaldOct 22,2020
CS222NetworkLocality Report
111.22
PLATTE
GREEN
131.250
JET
BAKER
172.66
WABASH
111.22.3.44 PLATTE
131.250.95.21 JET
172.66.7.88 WABASH
111.22.5.66 GREEN
131.250.47.63 BAKER
0.0.0.0 NONE
For this assignment, you will
create your own test data files
using the sample format. Grading
will involve using different data
files with the same format.
Programstructure and design:
Create a structure typecalled:
struct address_t
with componentsfor thefour integers of an IPv4 address alongwith a
fifth componentin which to store an associatedalias of up to 10
characters.
You will then declare an array of 100 address_tstructures in which to
store the data read in from “CS222_Inet.txt”.For this exercise you may
have 2 global variablesonly:
struct address_t addressArray[100];
FILE *outputReport
Includeat least the following UDFs (You may define your own prototypes):
a) readDataFile (Note: you may assume that the data file is syntacticallycorrect.)
b) generateLocalityRpt
c) getDateAndTime (sameas HW3)
Rubric 10 points:
? Is the source code well documented and formatted using clearly readable
indentation and white space (while viewed within vi)? 1 point
? Is struct address_t addressArray[100] properly implemented? 1 point
? Are the 3 UDFs properly implemented? 2 points
? Did you limityour program to2 (or fewer) global variables? 2points
? Is the sentinel input loop properly implemented? 2 points
? Is “222_Locality_Report” correct? 2 points
? Note:Your program must compile usinggcc in order toreceivecredit
Note: Other than prompting for the username, this project does not require an
interactive user interface.