EBK COMPUTER SCIENCE: AN OVERVIEW
12th Edition
ISBN: 8220102744196
Author: BRYLOW
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 7, Problem 30CRP
Program Plan Intro
Class diagram:
Class diagram is an interaction diagram that shows the how data is categorized, It is organizationally oriented. In this, the classes are arranged in groups that share common characteristics. It provides the structural view of the systems and captures the static structure of object oriented systems and it supports the architectural diagram.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Design UML Class Diagram for the given scenario.
Create a class Rectangle with attributes length and width, each of which defaults to 1.
• Provide methods that calculate the rectangle's perimeter and area.
• It has set and get methods for both length and width.
• The set methods should verify that length and width are each floating-point numbers larger
than 0.0 and less than 20.0.
At what time(s) can a class diagram change? How is it changed?
In a university there are different classrooms, offices and departments. A
department has a name and it contains many offices. A person working at the
university has a unique ID and can be a professor or an employee.
"A professor can be a full, associate or assistant professor and he/she is enrolled
in one department.
•Offices and classrooms have a number ID, and a classroom has a number of seats.
• Every employee works in an office.
1.
Draw the class diagram for the scenario above
Chapter 7 Solutions
EBK COMPUTER SCIENCE: AN OVERVIEW
Ch. 7.1 - Prob. 1QECh. 7.1 - Prob. 2QECh. 7.1 - Prob. 3QECh. 7.1 - Identify two contexts in which the field of...Ch. 7.2 - Prob. 1QECh. 7.2 - Prob. 2QECh. 7.2 - What is the role of a software requirements...Ch. 7.3 - Prob. 1QECh. 7.3 - Prob. 2QECh. 7.3 - Prob. 3QE
Ch. 7.3 - What potential problems do you suspect could arise...Ch. 7.4 - Prob. 1QECh. 7.4 - Prob. 2QECh. 7.4 - Prob. 3QECh. 7.4 - Prob. 4QECh. 7.4 - Prob. 5QECh. 7.4 - What is the difference between a traditional...Ch. 7.4 - Prob. 8QECh. 7.5 - Prob. 1QECh. 7.5 - Prob. 2QECh. 7.5 - Prob. 3QECh. 7.5 - Prob. 4QECh. 7.5 - Prob. 6QECh. 7.6 - Prob. 1QECh. 7.6 - Prob. 2QECh. 7.6 - Prob. 3QECh. 7.6 - Prob. 4QECh. 7.6 - Prob. 5QECh. 7.6 - Prob. 6QECh. 7.7 - Prob. 1QECh. 7.7 - Prob. 2QECh. 7.7 - Prob. 3QECh. 7.8 - Prob. 1QECh. 7.8 - Prob. 2QECh. 7.8 - Prob. 3QECh. 7.8 - Prob. 4QECh. 7.9 - Prob. 1QECh. 7.9 - Prob. 2QECh. 7.9 - Prob. 3QECh. 7 - Give an example of how efforts in the development...Ch. 7 - Prob. 2CRPCh. 7 - Explain how the lack of metrics for measuring...Ch. 7 - Would you expect that a metric for measuring the...Ch. 7 - Prob. 5CRPCh. 7 - Prob. 6CRPCh. 7 - Prob. 7CRPCh. 7 - Prob. 8CRPCh. 7 - Prob. 9CRPCh. 7 - Prob. 10CRPCh. 7 - Prob. 11CRPCh. 7 - Prob. 13CRPCh. 7 - Prob. 14CRPCh. 7 - Prob. 15CRPCh. 7 - Prob. 16CRPCh. 7 - Prob. 17CRPCh. 7 - Prob. 18CRPCh. 7 - Prob. 20CRPCh. 7 - Prob. 21CRPCh. 7 - Prob. 22CRPCh. 7 - Prob. 23CRPCh. 7 - Prob. 24CRPCh. 7 - Contrast the information represented in a class...Ch. 7 - What is the difference between a one-to-many...Ch. 7 - Prob. 27CRPCh. 7 - Prob. 28CRPCh. 7 - Prob. 29CRPCh. 7 - Prob. 30CRPCh. 7 - Prob. 31CRPCh. 7 - Prob. 32CRPCh. 7 - Prob. 33CRPCh. 7 - Prob. 34CRPCh. 7 - Extend your solution to the previous problem to...Ch. 7 - Prob. 38CRPCh. 7 - Prob. 39CRPCh. 7 - Identify some design patterns in fields other than...Ch. 7 - Prob. 41CRPCh. 7 - Prob. 42CRPCh. 7 - Prob. 43CRPCh. 7 - Prob. 44CRPCh. 7 - Prob. 45CRPCh. 7 - Prob. 46CRPCh. 7 - How does open-source development differ from beta...Ch. 7 - Prob. 48CRPCh. 7 - Prob. 49CRPCh. 7 - Prob. 50CRPCh. 7 - Prob. 51CRPCh. 7 - Prob. 52CRPCh. 7 - In what ways can a software developer be...Ch. 7 - Prob. 1SICh. 7 - Prob. 2SICh. 7 - Prob. 3SICh. 7 - Prob. 4SICh. 7 - Prob. 5SICh. 7 - What happens if technology begins to advance so...Ch. 7 - Is the computer revolution contributing to, or...Ch. 7 - Prob. 8SICh. 7 - If you had a time machine, in which period of...Ch. 7 - Prob. 10SI
Knowledge Booster
Similar questions
- Using UML class diagrams, create a design for the following (you can defer declaring the types for any instance variables and instance methods as long as you represent the concepts appropriately). NB: You may hand-draw your diagram or use a drawing program (your choice). Upload your finished answer for (a) and (b) as one file. (a) An Employer has one or more Employees. An Employee has exactly one Employer. Employees have attributes for their name, salary and job title (b) We are producing a vehicle registration system for the local DMV/RMV. Model the following using a UML class diagram. Read the entire specification before proceeding (this is ONE question, broken into 4 segments for readability): (i) Our interface (protocol/contract) IVehicle states that all vehicles can register() and calculateExciseTax(). These operations are public and the Vehicle contract is stable – it will not change. (ii) We think we’ll be able to take advantage of code-reuse, so your team must introduce an…arrow_forwardPlease prepare the case diagram and the class diagramarrow_forwardCreate your own UML diagram — similar to the above UML diagram — for a Pet class that meets thespecification below.1. Create the fields indicated below. Use these names exactly as given for your fields. Define them inexactly this order.• name — The name of the pet, e.g., “Rufus”, “Mittens”, “Smelly”, etc.• animal — The type of pet, e.g., “dog”, “cat”, “asparagus”, etc.• age — The (integer) number of years the pet has been alive, e.g., 1, 2, 3, etc.2. Create a mutator for each of the above in the order listed. Use the standard Java naming conventionfor mutators.3. Create an accessor for each of the above in the order listed. Use the standard Java naming conventionfor accessors.Example: Suppose you are taking the question for the example Car UML above instead of your Pet UML.Don’t enter any spaces at all.When the question asks: Enter line 1:You would enter: CarWhen the question asks: Enter line 2:You would enter: -make:StringWhen the question asks: Enter line 3:You would enter:…arrow_forward
- It is a Programming logic and design based questionarrow_forwardCreate your own UML diagram — similar to the below UML diagram — for a Pet class that meets thespecification below.1. Create the fields indicated below. Use these names exactly as given for your fields. Define them inexactly this order.• name — The name of the pet, e.g., “Rufus”, “Mittens”, “Smelly”, etc.• animal — The type of pet, e.g., “dog”, “cat”, “asparagus”, etc.• age — The (integer) number of years the pet has been alive, e.g., 1, 2, 3, etc.2. Create a mutator for each of the above in the order listed. Use the standard Java naming conventionfor mutators.3. Create an accessor for each of the above in the order listed. Use the standard Java naming conventionfor accessorsarrow_forwardThe class diagram with four classes Student, Graduate, Undergraduate, and Exchange isgiven. Write the classes as described in the class diagram. The fields and methods for each classis given below.Student:Fields: major (String)gpa (double)creditHours (int)Methods:getGpa: returns gpagetYear: returns a String of “freshman”, “sophomore”, “junior” or “senior” asdetermined by earned credit hours:• Freshman: Less than 32 credit hours• Sophomore: At least 32 credit hours but less than 64 credit hours• Junior: At least credit hours 64 but less than 96 credit hoursStudentExchangeGraduateUndergraduate• Senior: At least 96 credit hoursGraduate:Fields: degree (String) (“Masters” or “PhD”)concentration (String)years (int) (stores no. of years spent in grad school)Methods:getYears: returns years (this is an integer, not like the student…)getConcentration: returns concentration (ex: Data Science, NeuroScience,Bioinformatics, Cybersecurity, etc.)Undergraduate:Fields: honors (Boolean)Methods:isHonors:…arrow_forward
- Analysis: Q1: There are common attributes and methods between kids and trainers. What is the best choice for designing and writing the codes of these two classes? Explain your answer. Q2: Draw a simple class diagram showing only relationships between the classes. Implementation: After analysing the given requirements, implement the required application: with Object Oriented Programming style following the rules of good programming style (e.g. adding comments, etc.) using only the material covered in M251 (and its prerequisites) Hints: For each class, it is required to implement constructors, setters, getters, toString() method, and any other necessary method If the user tries to do an operation that could violate the state of objects, the operation should be ignored and the application should display an error message (e.g. adding a kid to the same group twice, etc.) Checking equality of any 2 objects should be done via the equals() method There is a class that will do the main job of…arrow_forwardWire is used in the following applications. For each application, prepare a list of wire characteristics that are relevant, (1) create class diagrams with attributes (2) create associate objects with values for each class. Use the following wire applications: Each wire application should have a separate diagram layout. a. Selecting wire for a transatlantic cable b. Designing the electrical system for an airplane c. Hanging a bird feeder from a tree d. Designing a piano e. Designing the filament for a light bulbarrow_forwardExplain how class (static) variables and methods differ from their instance counterparts. Give an example of a class that contains at least one class variable and at least one class method. Explain why using a class variable and method rather than an instance variable and method would be the correct choice in the example you select.arrow_forward
- Given: UML diagram of an Account object Below. Use Java progaramming Language. Note: The static variables/data fields and methods in UML class diagrams are underlined. Create an Account Object project. 1. Design an Account class and use the provided UML diagram to code the instance fields, constructors and methods. Note: The type of accounts are 1 (Savings) or 2 (Cheque) The constructor must assign the values of the parameters to the data fields/instance variables. The static field must be increased by one in the constructor. The setAccNumber() is a private void method. The account number must consist of the first 3 letters of the name of the account holder, the digit indicating the type of account and #-character and a 3-digit random value. This method must be called from the constructor. The makeDeposit() method must add the amount received as a parameter to the balance if the value received is not a negative value. The withdrawAmount() method must check whether the balance…arrow_forwardAnalysis: Q1: There are common attributes and methods between passengers and drivers. What is the best choice for designing and writing the codes of these two classes? Explain your answer. Q2: Draw a simple class diagram showing only relationships between the classes. Implementation: After analysing the given requirements, implement the required application: with Object Oriented Programming style following the rules of good programming style (e.g. adding comments, etc.) • using only the material covered in M251 (and its prerequisites) Java language*arrow_forwardanswers all questions and code using javaarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning