Questions
Assignment 8 – UML Diagram - Students Class Revised 9/2019 Throughout Chapters 9 & 10, there...

Assignment 8 – UML Diagram - Students Class Revised 9/2019

Throughout Chapters 9 & 10, there are UML class diagrams (Unified Modeling Language) which represent the data fields and methods in a class. From any class given to you, you should be able to design the UML diagram. Likewise, if given a UML, you should be able to define & implement the class.

Please do this in Java please, add comments so it's easy to understand and read so I know how to be able to do it myself.

For the assignment this week, you are given the UML diagram for a class named Students. You will define the Students class and then implement it with a driver program called StudentsDriver.

The StudentsDriver class with the main method should:

• Create an object of the Students class using the no-arg constructor

• get user input for student objects (see sample output below): first name, last name, student id, and birth year and then populate the object using setters (do not use constructors)

• create & initialize 2 objects of the Students class using the overloaded constructor as follows

o first name = Lisa Ann; last name = Larraby; student id = 54321; birth year = 1993 o first name = Karl; last name = Van der Hutten; student id = 54123; birth year = 1983

• call the class toString to display the output for each object as noted in sample output

Validation should be created in the Students class (not driver program):

• Range for student id is 54000 through 54999, inclusive

• Range for student age is from 13 years old to 100 years old, inclusive

• HINTS: in setters for studentID & for birthYear, move the assignment to the appropriate validation method. Then, in each setter, call the appropriate validation method.

*Note: for those already familiar with Java programming, please keep this simple: try/catch, exceptions, GUI, etc. Please use only the concepts discussed up to this point.

Before starting this lab, be sure to refer to the “How to Submit Assignments” document in eLearn for proper documentation, indention, naming conventions, etc. Points may be deducted if submitted incorrectly.

REMINDER: Any sources you use besides the textbook, class demo files, or the instructor must be documented in your program with details such as the scope of help received & URL.

Required project name: LastnameFirstname08 Required package name: chap10 Required class names: as noted above

Sample output. You’re encouraged to use valid, invalid, & boundary test cases. User input in green text:

Enter First Name: Juan Mateo Enter Last Name: Lopez

Enter Student ID: 53500 ID range is 54000 to 54999. Please try again: 53600 ID range is 54000 to 54999. Please try again: 53700 ID range is 54000 to 54999. Please try again: 55000 ID range is 54000 to 54999. Please try again: 56000 ID range is 54000 to 54999. Please try again: 54000

Enter 4-Digit Year of Birth: 1900 Range is 1919 to 2006. Please try again: 1910 Range is 1919 to 2006. Please try again: 1915 Range is 1919 to 2006. Please try again: 2010 Range is 1919 to 2006. Please try again: 2015 Range is 1919 to 2006. Please try again: 1960

Juan Mateo Lopez

Student ID: 54000 Age in 2019: 59 years old

Lisa Ann Larraby

Student ID: 54321 Age in 2019: 26 years old

Karl Van der Hutten Student ID: 54123 Age in 2019: 36 years old

Students

- firstName: String - lastName: String - studentID: int - birthYear: int - CURRENT_YEAR: int - YOUNGEST_AGE:int - OLDEST_AGE:int - LOW_ID:int - HIGH_ID:int

+ Students() + Students(first: String, last: String, studentID: int, birthYear: int)

+ getFirstName(): String + setFirstName (firstName: String): void + getLastName(): String + setLastName (lastName: String): void + getStudentID(): int + setStudentID (studentID: int): void + getBirthYear(): int + setBirthYear(birthYear: int): void + getCurrentYear(): int + getYoungestAge(): int + getOldestAge(): int + getLowId(): int + getHighId(): int

+ validateID(int id): int + validateYr(int yr): int + calcAge(): int + toString(): String <>

You will be graded according to the following rubric (each item is worth one point):

• The Students class is defined exactly & completely as indicated in the UML class diagram.

• Values for constants are used only in initialization and are not hard coded in the methods of the Students class.

• One object is initialized with user input using the Students class setters.

• Two objects are initialized using the Students class overloaded constructor.

• Validation is executed in 2 methods in the Students class.

• In all methods of the Students class, there are no hard coded values.

• Your program compiles & runs.

• You follow standard coding conventions (e.g. variable names, indentation, comments, etc.).

• File name, global comment, citations, etc. as indicated on How to Submit Assignments (Course Overview).

• Your Eclipse project was exported correctly (see Hello World Video Tutorial in Topic 1 Learning Activities).

In: Computer Science

(History of Economic Thought) Question. 1) (i) There are three concepts in Adam Smith’s value theory...

(History of Economic Thought) Question.

1) (i) There are three concepts in Adam Smith’s value theory that are very similar to each other: ‘labor theory of value’, ‘labor commanded theory of value’ and the ‘adding up theory of value’. Making sure that you show the differences between the three concepts, and giving examples to show these differences, explain how the price of a commodity will be determined in these three approaches. (ii) Smith believes that one of these measures is inappropriate for a capitalist economy, an idea that Ricardo has objected to. Which measure does Smith consider to be inappropriate for a capitalist economy, and how does Ricardo criticize this argument of Smith?

In: Economics

Write a program in MIPS Assembly. This program will ask the user to enter 20 numbers....

Write a program in MIPS Assembly.

This program will ask the user to enter 20 numbers. The program will store these numbers in an array in memory (sequential memory locations). It will then print out the list of numbers in three different formats:

  1. The numbers will be printed each on a separate line.
  2. The numbers will be printed on a single line, with spaces between the numbers.
  3. The program will ask the user to enter a number n. The program will then print the list with n numbers on each line. For example, if the user enters '3', the program will print the first three numbers of the list on the first line, the second three numbers on the second line, and so on.

Also, check for any wrong inputs and handle the error.

In: Computer Science

Draw a demand curve that shows an decrease in price (from P1 to P2) and the...

Draw a demand curve that shows an decrease in price (from P1 to P2) and the corresponding change in quantity demand (from Q1 to Q2) leaving the revenue unchanged.

Use the graph to show the initial and the final revenue. Make sure that the area indicating the revenue is, in fact, constant.

Add a (simple) scale to your axes and calculate the initial revenue, the loss and gain in revenue due to the price increase, and the final revenue.

In: Economics

What two types of services do internal auditors provide? Provide three examples of each type of...

What two types of services do internal auditors provide? Provide three examples of each type of engagement.

What steps are included in the planning phase of an assurance engagement?

What is the relationship between business objectives and business assertions?

What does "inherent risk" mean?

What elements do well-written observations include?

What is the difference between "negative assurance" and "positive assurance?"

What information must final assurance engagement communications include?

In: Accounting

Suppose you are investigating whether there is a difference in taste between organic milk and regular...

Suppose you are investigating whether there is a difference in taste between organic milk and regular milk. You recruit 16 random volunteers and ask each one individually after tasting to tell you which of two unmarked glasses contains the organic milk. Let X be the number of correct guesses. If there really were no difference in taste between organic milk and regular milk, what would be the probability of exactly six correct guesses, to three decimal points?

In: Statistics and Probability

Two psychologists are studying the IQs of a group of business professionals. Let A be the...

Two psychologists are studying the IQs of a group of business professionals.

  • Let A be the event that a professional's IQ is greater than 115, with P(A)=16%.
  • Let B be the event that a professional's IQ is between 115 and 130, with P(B)=14%.

The IQs of different professionals are independent events. What is the probability that two random professionals will be chosen and one of their IQs is greater than 115 and the other is between 115 and 130?

Give your answer as a decimal, rounded to three decimal places.

In: Statistics and Probability

A survey reported that the mean starting salary for college graduates after a three-year program was...

A survey reported that the mean starting salary for college graduates after a three-year program was $35,710.Assume that the distribution of starting salaries follows the normal distribution with a standard deviation of $3320. What percentage of the graduates have starting salaries: (Round z-score computation to 2 decimal places and the final answers to 4 decimal places.) a. Between $31,800 and $39,200? Probability b. More than $43,600? Probability c. Between $39,200 and $43,600? Probability

In: Statistics and Probability

A hunter is standing on flat ground between two vertical cliffs that are directly opposite one...

A hunter is standing on flat ground between two vertical cliffs that are directly opposite one another. He is closer to one cliff than the other. He fires a gun and, after a while, hears three echoes. The second echo arrives 1.04 s after the first, and the third echo arrives 0.630 s after the second. Assuming that the speed of sound is 343 m/s and that there are no reflections of sound from the ground, find the distance (in m) between the cliffs.

In: Physics

A video game developer is testing a new game on three different groups. Each group represents...

A video game developer is testing a new game on three different groups. Each group represents a different target market for the game. The developer collects scores from a random sample from each group. The results are shown below

Group A Group B Group C
97 152 99
103 148 110
95 161 198
110 112 183
106 129 155

That is the mean sum of squares Between  MS(Between)?

In: Statistics and Probability