合肥生活安徽新闻合肥交通合肥房产生活服务合肥教育合肥招聘合肥旅游文化艺术合肥美食合肥地图合肥社保合肥医院企业服务合肥法律

代写CSCI 6836、代做Java编程设计

时间:2023-12-05  来源:合肥网hfw.cc  作者:hfw.cc 我要纠错



CSCI 6836 Section V1: Assignment 4
Fairleigh Dickinson University Vancouver
Fall 2023
Assigned: Monday, November 27, 2023
Due: Beginning of class, Monday, December 4, 2023 using Webcampus
Instructions
This assignment has 100 points. Complete this assignment entirely on your own. Submission must follow
the guidelines stated in What to Submit and Quality Requirements exactly.
This assignment is about graph algorithms. You must implement your own graph data structure. Do not use any off-the-shelf graph libraries.
Problem Definition
Implement a Graph class (undirected) using adjacency list representation. The graph class must include
a fromFile(inputFileName) method for reading an input file and constructing the graph object. After
constructing the graph, your program must perform breadth first search (BFS) and depth first search (DFS)
starting from a node specified by the user, and write the output to an output file. Sample input and output
are provided below. The program should be compiled from the command line as follows:
javac Graph.java
and run as follows:
java Graph <input file name> <number of nodes> <starting node> <output file name>
If the number of command line arguments is incorrect or if the user types
java Graph --help
or
java Graph -h
then the program should print
Usage: java Graph <input file name> <number of nodes> <starting node> <output file name>
Example
Suppose a file named myinput.txt specifies an undirected graph by enumerating its edges as follows:
1 2
2 3
3 4
4 5
1 5
1
Note that each edge is represented as i j where i < j. Then, running the program as below:
java Graph myinput.txt 5 1 myoutput.txt
must produce the following output in myoutput.txt:
BFS:
1 2
1 5
2 3
4 5
DFS:
1 2
2 3
3 4
4 5
Similar to the input, each edge in the output is represented as i j where i < j.
What to Submit
Please submit your code as a single Java file with the extension changed to .txt, i.e., the file name should
be Graph.txt.
Quality Requirements
The program must conform to the following:
• The program must be written in Java.
• The implementations must be based on the algorithms as discussed in class. In particular, DFS
implementation must be non-recursive.
• Programs must be of high quality, check for error conditions and edge cases, and follow industry
standard coding and commenting guidelines.
• Code based on online resources such as tutorials or blogs or wikis will receive zero credit.
• Code written using generative AI models will receive zero credit.
请加QQ:99515681 或邮箱:99515681@qq.com   WX:codehelp

扫一扫在手机打开当前页
  • 上一篇:代写指标 代做指标公式代做 通达信选股公式
  • 下一篇:代写选股公式 代写通达信多因子量化指标
  • 无相关信息
    合肥生活资讯

    合肥图文信息
    新能源捕鱼一体电鱼竿好用吗
    新能源捕鱼一体电鱼竿好用吗
    海信罗马假日洗衣机亮相AWE  复古美学与现代科技完美结合
    海信罗马假日洗衣机亮相AWE 复古美学与现代
    合肥机场巴士4号线
    合肥机场巴士4号线
    合肥机场巴士3号线
    合肥机场巴士3号线
    合肥机场巴士2号线
    合肥机场巴士2号线
    合肥机场巴士1号线
    合肥机场巴士1号线
    合肥轨道交通线路图
    合肥轨道交通线路图
    合肥地铁5号线 运营时刻表
    合肥地铁5号线 运营时刻表
  • 币安app官网下载

    关于我们 | 打赏支持 | 广告服务 | 联系我们 | 网站地图 | 免责声明 | 帮助中心 | 友情链接 |

    Copyright © 2024 hfw.cc Inc. All Rights Reserved. 合肥网 版权所有
    ICP备06013414号-3 公安备 42010502001045