代码代写|LAB 4 : Single-Cycle CPU
本次作业案例分享是来自加拿大的一个COMP 250 assignment 2,主要内容是一个数据结构的java代写
General instructions
• Search for the keyword updated to find any places where the PDF has been updated.
• T.A. office hours will be posted on mycourses under the “Office Hours” tab. For zoom OH, if there is a problem with the zoom link or it is missing, please email the T.A. and the instructor.
• If you would like a TA to look at your solution code outside of office hours, you may post a private question on the discussion board.
• We will provide you with some examples to test your code. See file Test.java which is part of the starter code. If you pass all these tests, you will get at least 60/100. These tests correspond exactly
to the exposed tests on Ed. Unlike in Assignment 1, however, we will not use hidden tests on Ed.
Instead, we will use private tests.
[Updated: We will use hidden tests as we did on Assignment 1. So you will know how many tests you have passed. There are 40 points for hidden tests.]
We strongly encourage you to come up with more creative test cases, and to share these test cases on the discussion board. There is a crucial distinction between sharing test cases and sharing solution code. We encourage the former, whereas the latter is a serious academic offense.
• Policy on Academic Integrity: See the Course Outline Sec. 7 for the general policies. You are also expected to read the posted checklist PDF that specifies what is allowed and what is not allowed on the assignment(s).
• Late policy: Late assignments will be accepted up to two days late and will be penalized by 10 points per day. If you submit one minute late, this is equivalent to submitting 23 hours and 59 minutes late, etc. So, make sure you are nowhere near that threshold when you submit. Please see the submission instructions at the end of this document for more details.
1 Introduction
In this assignment, you will get some basic experience working with inheritance and polymorphism. We model parts of a small economy, namely the food service industry. We model places where customers can buy food: restaurants, food stands, and fast food. We model the payment of bills, including sales tax and tip. We do not model many other things such as the food or menu. We also model a tax collector who collects both sales tax and income tax. We only model one year: the workers each have some income and pay tax for that year.
This document is organized as follows. In this section we present the various classes of the model. We chose the ordering of classes in the way that we think it easiest to understand. Later in the document (Sec.) we recommend a different ordering for you to implement and test the classes. Note that many of the methods have been implemented for you, in particular, all the getters and setters.
We present a UML diagram for each class, and indicate if one class extends another. For all the classes in this assignment, all fields are private and all methods are public. In the class descriptions below, we do not bother to mention fields or methods whose meaning is obvious, such as getter or setter methods.
We start with a few classes that model the food places. Here are a UML diagram for FoodPlace classes and subclasses.