代写java Assignment作业、代做UML Class Diagram程序作业、代写代做java程序作业代做McMaster-Carr、代做CS5010 java
? Please push your individual solutions to your designated repo within the CS5010 GitHub ?organization. Commit, push and tag a release after each part of each exercise. ?Resources ?You might find the following online resource useful while tackling this assignment:
? Java 8 Online Documentation ?
? JUnit 4 Getting Started Online Documentation ?
? UML Diagram Online Documentation ?Submission Requirements ?Your repository should contain a separate package for every problem. ?The package names should follow this naming convention: assignmentN.problemM, where you replace N with the assignment number, and M with the problem number, e.g., all your code for problem 1 for this assignment must be in a package named.assignment1.problem1. ?Additional expectations for every package: ?
? One file per Java class ?
? One file per Java test class ?
? One pdf or image file for each UML Class Diagram that you create ?
? All methods must have tests ?
? All non-test classes and non-test methods must have valid Javadoc ?Your packages should not contain: ?
? Any files ?
? Any files ?
? Any IntelliJ specific files ?Lastly, a few more rules that you should follow in this assignment?: ?
??Your classes should have a public modifier
?
.java .java
.class
.html
? Instance fields should have a private modifier ?
? Static methods or fields are not allowed ?
? Use this to access instance methods and fields inside a class ?ASSIGNMENT 2: Due Sept 24 Hardware Orders, Part 1 ?You are implementing an automated order management and validation program for a hardware supplier. Specifically, your system will be designed to handle rotary shafts, sprockets, and standard ball and roller bearings as stocked by McMaster-Carr: ?Rotary shafts (available in metric and standard measurements): ?https://www.mcmaster.com/ - rotary-shafts/=62554d3ecbe644dd9f72e1b6addcd19ajm0sbuef ?Sprockets (standard measurement): ?https://www.mcmaster.com/ - sprockets/=f1d073e90fbf48fe9ba226127f66a2fdjm0sa73b ?Sprockets (metric measurement): ?https://www.mcmaster.com/ - sprockets/=1defba01cc5747a687323b85c2b675a4jm0sbc0d ?Precision ball bearings (metric measurement): ?https://www.mcmaster.com/ - standard-ball-and-roller- bearings/=a21dba81bd62403e9192ab90ff78e17fjm0scgth ?Refer to the links above and use real items from these lists as your test objects and to populate your stock service. ?Classes and interfaces ?For Hardware Orders, Part 1, you should begin by organizing your data in classes, subclasses, and interfaces. Your system should implement (at least) the following classes. Some of these classes may be best implemented as abstract classes, to be in turn extended by concrete classes: ?
? StockItem. All items that can be ordered within the system have a category, a SKU (stock-keeping unit) number, and a price. The category is at the top of the McMaster- Carr page (e.g. "Precision Ball Bearings"). The SKU# for items is listed in the unlabeled second-to-last column on the McMaster-Carr page. The price is in the last (rightmost) column. ?
? RotaryShaft. Rotary shafts in your system must have the following characteristics represented: length, diameter, and system of measurement. ?
? Sprocket. Sprockets are shaft-mounted hardware. Sprockets in your system must have the following characteristics represented: number of teeth, system of measurement, and "for shaft diameter", which indicates which sized shaft the sprocket fits on. ?
?
??BallBearing. Ball bearings are also shaft-mounted. Ball bearings must have the following characteristics represented: seal type, width, and "for shaft diameter". Your system handles only ball bearings in metric measurements, so "system of measurement" is optional. You should decide whether or not to add that field, and be prepared to explain your decision as to why or why not.
Some tips:
? For working with money, it's good to avoid using float and double types due to rounding errors. It's better to use int types and to deal with indivisible monetary units (i.e. cents in US currency) when possible. You may consider defining a Price class to take advantage of the toString() method for printing prices. How should such a class's constructor work? What getters and setters should it have? ?
? System of measurement and ball bearing seal type are two attributes that would be well represented by enum classes. Read the docs to see how to use enums to represent types with a strictly limited set of values. ?Your tasks for Hardware Orders, Part 1: ?
1. Implement all required classes as concisely as possible. Use abstract classes, subclasses, and interfaces where appropriate (all of these have appropriate uses in this problem, so your solution will be expected to make use of all of them). ?
2. Implement any other classes that seem appropriate to the problem domain. Try to keep the structure of the implementation as simple, clear, and consistent as possible. Think about how best to future-proof your implementation; consider realistic future changes to the requirements of a system like this, and code your solution in a way that would make accommodating foreseeable changes as easy as possible. Be prepared to discuss ways in which you have done this. ?
3. Write unit tests for successful and unsuccessful cases and to test for various combinations of systems of measurement, etc. using actual data from the McMaster-Carr website links listed above. ?
4. Write appropriate JavaDoc comments for all classes and methods. ?
5. Provide your final UML diagram that includes the methods you defined. ?
6. Commit, push, and tag a release representing your work on Hardware Orders, Part 1. ?
ASSIGNMENT 3: Due Oct 8 Hardware Orders, Part 2
Now it's time to focus on the functionality of the application you began in Hardware Orders, Part 1. Extend the code from Part 1 to incorporate (at least) the following classes. As you work on the following functionality, you may find cause to re-think some of the decisions you made on Part 1. Modify those classes as necessary. The classes and methods you'll implement for Part 2 are:
??StockService. This class will mimic the behavior of a database interface. In a real application, you would have a service that retrieves items from an actual database and provides them via an API. Instead, for the purposes of this exercise, you will implement
a class that has a hand-coded hash map of stock items keyed on the items' SKU#s. The stock should include multiple instances of each category in multiple sizes and with varying attributes and measurement systems, in order to test all the necessary functionality of the system.
??OrderManager. This will be where the main functionality of your program resides. It will maintain a current order in the form of a list of SKU#s. It should implement the following public methods:
o addToOrder should take a SKU# as an argument and add that item to the current order if that item is in stock. It should give useful feedback by standard output indicating whether the item was added to the order (a SKU# that is not in stock should not be added, and the user should be informed of the issue).
o removeOneFromOrder should take a SKU# as an argument and remove one instance of that item from the current order. It should give useful feedback via standard output as to whether the item was removed.
o validateMeasurementSystem should confirm that all items in the current order conform to the same measurement system. It should return a Boolean value ("true" if all items conform and "false" if the order includes mixed measurement systems). It should also print a report to the standard output giving useful information about the measurements (it is up to you to decide what this method should report).
o filterByMeasurementSystem should take a measurement system (metric or standard) as an argument and delete all items in the order that do not conform to that measurement system, leaving only those items in the order that do conform to the measurement system.
o orderCategory will check each item in the order for its category (e.g. "Precision Ball Bearings") and return the category if all items share the same category, and return "Mixed" if the order contains items of different categories.
o printDocket should print out (to standard output) a tabulated report of the current order listing the category, SKU#, and price of each item in the order, with the total cost at the bottom of the report.
o checkFit should take two arbitrary stock item SKU#s and determine whether they represent a shaft/shaft-mounted pair of items for which the diameter of the shaft matches the "for shaft diameter" value of the shaft-mounted part. It should return a Boolean value representing whether the two items fit each other. If so, it should print a report to standard output following this format:
Precision Ball Bearings SKU# 6661K13 for 10mm shaft fits on Rotary Shafts SKU# 1482K11
If the items are a shaft/shaft-mounted pair but do not fit each other, the system should report:
Precision Ball Bearings SKU# 6661K12 for 8mm shaft does not fit on Rotary Shafts SKU# 1482K11
If the items are not a shaft/shaft-mounted pair at all (i.e. two shafts or two shaft- mounted items), or if they are not in stock at all, the system should simply report:
Not a shaft/shaft-mounted pair
This should work regardless of the order that the items are passed to the method as arguments.
Working with HashMaps and ArrayLists:
For creating a set of objects keyed on the SKU# (a String object), a hash map is a useful Java data structure. For representing the current order an ArrayList (either of SKU#s or of StockItems, you decide) would be appropriate.
Both HashMaps and ArrayLists can be specified to contain objects of certain classes using generics. A HashMap is a collection of key/value pairs and an ArrayList is an indexed sequential collection. Both are included in the java.utils library and must be imported into any file where they are used with the following import commands, which should come at the very beginning of the file:
import java.util.HashMap; import java.util.ArrayList;
Once you've imported them, you can create objects by calling the constructor with the contained classes indicated between angle brackets. So in the case of a HashMap of StockItems keyed on a String class SKU#, your HashMap initialization might look like this:
private HashMap<String, StockItem> stock = new HashMap<String, StockItem>();
Key value pairs can be added to a HashMap object using the .put() method, for example:
stock.put("2302K53", new SprocketForMetricChain("2302K53", 3111, 30, 8));
Refer to the Java API documentation for further details on working with both ArrayLists and HashMaps.
Your tasks for Hardware Orders, Part 2:
1. Implement the required classes and methods for Part 2. ?
2. Implement any other classes that seem appropriate to the problem domain, and update ?any classes from Part 1 as appropriate. Be prepared to discuss your choices and any ?changes you've made. ?
3. Create a manual stock of items for your StockService class using actual data from the ?McMaster-Carr web pages above. ?
4. Write unit tests for successful and unsuccessful cases and to test for various ?combinations of systems of measurement, etc. ?
5. Write appropriate JavaDoc comments for all classes and methods. ?
6. Provide your final UML diagram that includes the methods you defined. ?
7. Commit, push, and tag a release representing your work on Hardware Orders, Part 2. ?
Theater Reservations, Part 1
For this exercise, you'll implement a reservation system for movie theaters that automatically places users in the most desirable seats available for their party.
The user will interact with the system on the command line. The system will prompt the user with the phrase "What would you like to do" and the user can enter "reserve <number>" to
reserve that number of seats, "show" to display the current available seating in the theater, and "done" to shut down the system.
When a user requests to reserve some number of seats, the system automatically finds the best seats in the theater that share a single row. The "best seats" are assumed to be in the rows nearest the middle of the theater (not too close, not too far). If no rows contain a sufficient number of unreserved seats, the system will apologize and decline to make a reservation.
A few points to consider:
? Best seats are filled first-come/first-serve, provided there are enough empty seats in a row to accommodate a party ?
? Best seats are determined by proximity to the center row. A seat N rows ahead of the center row is regarded as approximately equivalent to a seat N rows behind the center row. The front row and the back row (in either order) should be the last two rows assigned. ?
? Left/right/center priority need not be considered. Rows can fill up from left to right or vice versa, or from the center, as long as parties are not separated. ?
? No party is separated by the system across multiple rows. The number of seats in a single reservation must all be together on the same row, or the reservation will not be made. ?A session with the reservations system might look as follows: ?What would you like to do? reserve 7?What's your name??Tony ?
I've reserved 7 seats for you at the Roxy in row 7, Tony. What would you like to do??show
1__________ 2__________ 3__________ 4__________ 5__________ 6__________ 7__________ 8XXXXXXX___ 9__________
10 _ _ _ _ 11 _ _ _ _ 12 _ _ _ _ 13 _ _ _ _ 14 _ _ _ _ 15 _ _ _ _
What would?reserve 11?Sorry, we don't have that many seats together for you.
What would you like to do? reserve 9?What's your name?
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
you like to do?
Sara?I've reserved 9 seats for you at the Roxy in row 6, Sara.
What would you like to do? show
1__________ 2__________ 3__________ 4__________ 5__________ 6__________ 7XXXXXXXXX_ 8XXXXXXX___ 9__________
10 _ _ _ _ _ _ _ _ _ _ 11 _ _ _ _ _ _ _ _ _ _ 12 _ _ _ _ _ _ _ _ _ _ 13 _ _ _ _ _ _ _ _ _ _ 14 _ _ _ _ _ _ _ _ _ _ 15 _ _ _ _ _ _ _ _ _ _
What would you like to do? reserve 5?What's your name??Jo
I've reserved 5 seats for you at the Roxy in row 8, Jo.
What would you like to do? show
1__________ 2__________ 3__________ 4__________ 5__________ 6__________ 7XXXXXXXXX_ 8XXXXXXX___ 9XXXXX_____
10 _ _ _ _ _ _ _ _ _ _ 11 _ _ _ _ _ _ _ _ _ _ 12 _ _ _ _ _ _ _ _ _ _ 13 _ _ _ _ _ _ _ _ _ _ 14 _ _ _ _ _ _ _ _ _ _ 15 _ _ _ _ _ _ _ _ _ _
What would you like to do? reserve 3?What's your name??Jean Claude
I've reserved 3 seats for you at the Roxy in row 7, Jean Claude. What would you like to do??show
1__________ 2__________ 3__________ 4__________ 5__________
6__________ 7XXXXXXXXX_ 8XXXXXXXXXX 9XXXXX_____
10 _
11 _
12 _
13 _
14 _
15 _
What
done
Have
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
would you like to do? a nice day!
Your system should define the following classes:
??Seat. A seat object must have:?o A seat name, which is a string value representing a capital letter from A to Z.?o A "reserved for" value which represents the name of the person for whom it has
been reserved, or is null if the seat has not been reserved???Row. A row is a list of seats. The Row class should extend ArrayList of Seat objects.
o A Row object should have a row number (1 is closest to the screen, etc.)
o The Row constructor should take a number of seats as an argument. ??Theater. A theater has:
o A name.?o A collection of rows (you may implement this however you choose).
? ReservationsService. This class will implement the actual service as a public method that takes a theater as its argument. ?
? ReservationSystem. This class will only contain a main method. It will create a new instance of Theater and call the service implemented in ReservationsService with the theater object as its argument. ?Your tasks: ?
1. Write a code to implement the classes listed above. Decide where the appropriate functionality should reside. For example, consider how the "show" command should interact with the various class's toString() methods. ?
2. Design the algorithm that finds the optimal row based on its proximity to the center. Use the simplest approach you can to determine the optimal row. ?
3. Write tests for all classes. ?
4. Provide your final UML diagram that includes all relevant methods. ?
5. Commit, push, and tag a release representing your work on Theater Reservations, Part 1. ?
Theater Reservations, Part 2
The above system needs an overhaul to take into consideration the requirements of accessible design. We now need to make sure that at least one row in every movie theater is wheelchair accessible, and we need to factor this into the reservations process.
??Row:?o A Row must now have a field indicating whether or not it is wheelchair
accessible ??Theater:
o A theater should take a non-empty list (or array) of integers indicating which of its rows are accessible
Functionality:
The system will function as before, but now, when the user requests to reserve seats it will respond with the prompt "Do you need wheelchair accessible seats?" If the user answers "yes," the system will search for the best seats from among the rows that are wheelchair accessible. If the user answers "no," the system will search for the best seats from among the rows that are not wheelchair accessible.
If and only if all other rows are occupied, then the system will reserve seats in accessible rows to users who do not need accessible seats.
The "show" command should indicate which rows are wheelchair-accessible. Whereas seats in rows that are not accessible are represented by "_" seats in rows that are wheelchair-accessible should be represented by "=".
Extend your work from Theater Reservations, Part 1 in the following ways.
Your tasks:
1. Ensure that the Theater constructor takes a list of values indicating which of its rows are accessible. A theater without accessible rows should not be allowed. ?
2. Ensure that Row contains a field stipulating whether or not it is wheelchair accessible ?
3. Modify the reservation interface such that the necessary prompts are given to the user ?and the necessary information is collected from the user. ?
4. Modify the reservation process such that users are assigned seats appropriately based on ?their need for wheelchair-accessibility. ?
5. Modify the appropriate toString() code such that accessible rows are distinguished ?from non-accessible rows when the "show" command is given. ?
6. Write tests to cover new functionality. ?
7. Provide your final UML diagram that includes all relevant methods. ?
8. Commit, push, and tag a release representing your work on Theater Reservations, Part 2
http://www.daixie0.com/contents/9/1710.html. ?

因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com

微信:codinghelp

转载于:https://www.cnblogs.com/javahelp89/p/9690943.html

代写java Assignment作业、代做UML Class Diagram程序作业、代写代做java程序作业代做McMaster-Carr、代做CS5010 java...相关推荐

  1. COMP 3023代写、代写COMP 3023、代做 C++ - Assignment、 代编码C++ - Assignment

    COMP 3023代写.代写COMP 3023.代做 C++ - Assignment. 代编码C++ - Assignment Revision 1 COMP 3023 Software Devel ...

  2. Java基础知识(一),打好基础才能写出高质量代码

    前沿:不管工作多久,基础永远是最重要的,好多大厂看的就是基础好不好,所以写代码的同时,基础知识还是要去理解和记忆的,坚持每天来看一点 Java基础.语法: java面向对象的特征有哪些方面? 1.抽象 ...

  3. Java:封装的概念,UML类图,构造方法,this关键字,static关键字,方法重载,包package

                     oop三大特性:封装,继承,多态 oop一般指面向对象程序设计(一种计算机编程架构) 一.封装的概念:    将东西包在一起,然后以新的完整形式呈现出来       ...

  4. java模拟电梯程序_Java编写的电梯模拟系统《结对作业》

    伙伴成员:李伊 http://home.cnblogs.com/u/Yililove/ 对于这次作业,我刚开始一点思绪都没有,在老师安排了结对伙伴李伊之后,我的搭档问我,我们需要什么编程语言来编写程序 ...

  5. java打字游戏代码_牛逼啊!一个随时随地写Python代码的神器

    现在学Python的人越来越多,很多小伙伴都非常有激情.利用碎片时间随时随地学习Python, 大家知道Python是一门编程语言,但是学语言光看不练是没有用的.最好能编程并运行,有没有什么好的神器可 ...

  6. java update 8_版本任你发,我用Java 8!JDK的更新,改变了哪些你写代码的方式?...

    前几天,JDK 14 正式发布了,这次发布的新版本一共包含了16个新的特性. 其实,从Java8 到 Java14 ,真正的改变了程序员写代码的方式的特性并不多,我们这篇文章就来看一下都有哪些. La ...

  7. 如下哪个是Java中的合法自定义标识符_吉大13春《面向对象程序设计》在线作业答案...

    吉大13春<面向对象程序设计>在线作业答案 2013-03-21 01:03:14 259 有学员问关于吉大13春<面向对象程序设计>在线作业答案的题目的参考答案和解析,具体如 ...

  8. 整理UML建模概念和图形~(啥?程序员不再写代码,变成画图工程师?)

    前言: 工程图纸对于工程师的重要性就不需要我多说了吧,对事物建模也是很重要的.我们在软件工程部分说过"建造一个狗窝和一栋大厦是完全不一样的",很多时候如果你有很好的idea,但是对 ...

  9. Java 10种常见设计模式UML图

    Java 10种常见设计模式UML图 简单工厂模式(不属于23种设计模式) 工厂方法模式 单例 模式(静态内部类方式 IODH) 适配器模式 装饰者模式 门面模式 代理模式(静态代理) 观察者模式 策 ...

最新文章

  1. iOS 开发_..和self...的区别以及使用
  2. MethodTrace 生成的trace文件为空
  3. 包区别 版本_详解Linux下二进制包、源代码包、rpm包区别与联系
  4. hc05与单片机连接图_单片机科普:单片机的IO口不够用了怎么办?如何扩展单片机的IO口...
  5. SVN报Previous operation has not finished; run 'cleanup' if it was interrupted错误的解决方法
  6. 河北软件职业技术学院计算机专业分数线,河北软件职业技术学院历年分数线 2021河北软件职业技术学院录取分数线...
  7. axios post body参数_vue之axios封装
  8. 正则语言和正则表达式_探索正则表达式背后的语言学
  9. gin 编译路径错误_[系列] Gin框架 - 自定义错误处理
  10. Datawhale 零基础入门数据挖掘-Task4 建模调参
  11. 【BZOJ 1095】 [ZJOI2007]Hide 捉迷藏 括号序列
  12. 每一个都能笑抽的39个奇葩代码注释
  13. JavaMail简单接收邮件
  14. HTML5和CSS3新增
  15. Ubuntu20.04安装C++版Opencv4
  16. css动画钟表——transform之rotate
  17. 【三次集训】Day1思维题题解报告
  18. 让你重新爱上 Windows 的小众软件
  19. Kaggle下载criteo数据集
  20. WordPress怎么使用支持注册用户上传自定义头像功能?

热门文章

  1. Java面试官:兄弟,你确定double精度比float低吗?
  2. QQ音乐7.0换新上线: 轻简风带来全新听歌体验
  3. 理解HPV和VPA两个对象
  4. 独立产品灵感周刊 DecoHack #028 - 如何给你的项目取一个好名字
  5. WKWebView、Safari、SFSafariViewController的区别与选取
  6. Mac pro 突然没有办法按住shift打出大写S
  7. 科技项目申报的几个技巧
  8. “msg“: “查询失败Text ‘2021-02-25T23:59:59‘ could not be parsed at index 10“
  9. 实现shiro-remember功能
  10. 应对全球变暖,数据分析是不可或缺的工具