Exercise 1 : Implement the class Student as presented by the following UML diagram: Exercise 2 :
Fantastic news! We've Found the answer you've been seeking!
Question:
Exercise 1 : Implement the class Student as presented by the following UML diagram:
Exercise 2 : Write a driver class to test the Student class as follow:
Transcribed Image Text:
Excrcise L(60 pts) Implement the class Student as presented by the following UML. diagram: Student -name: String could be formed of more than two words -id: int -gender: char -address: String +Student(--All Attributes--) (10 pts) +getters'setters (20 pts) +formatName(): void (20 pts) capitalize the first letter of every word in name *printDesrciption(): void (10 pts) Excrcise 2. (40 pts) Write a driver class to test the Student class as follows: a. Create a student object s by reading his her name, id, gender and address from the user, (10 pts) b. Change its id with any other id. (6 pts) c. Display the name of s. (6 pts) d. Format his her name and then display it. (6 pts) e Print the description of s. (6 pts) £ Display either the word Male or the word Female according to the gender of s. (6 pts) Sample Run: Enter name: ali abdel Karim el masri Enter the atudent id: 1111 Enter M for male and r for female: m Enter address: Hamra ali abdel Karin el manri After formatting the name: Ali Abdel Karin El Manri Student (name - Ali Abdel Karim El Masri, id 3333, gender H, addreas - Hamra) The gender of a in Male Excrcise L(60 pts) Implement the class Student as presented by the following UML. diagram: Student -name: String could be formed of more than two words -id: int -gender: char -address: String +Student(--All Attributes--) (10 pts) +getters'setters (20 pts) +formatName(): void (20 pts) capitalize the first letter of every word in name *printDesrciption(): void (10 pts) Excrcise 2. (40 pts) Write a driver class to test the Student class as follows: a. Create a student object s by reading his her name, id, gender and address from the user, (10 pts) b. Change its id with any other id. (6 pts) c. Display the name of s. (6 pts) d. Format his her name and then display it. (6 pts) e Print the description of s. (6 pts) £ Display either the word Male or the word Female according to the gender of s. (6 pts) Sample Run: Enter name: ali abdel Karim el masri Enter the atudent id: 1111 Enter M for male and r for female: m Enter address: Hamra ali abdel Karin el manri After formatting the name: Ali Abdel Karin El Manri Student (name - Ali Abdel Karim El Masri, id 3333, gender H, addreas - Hamra) The gender of a in Male
Expert Answer:
Answer rating: 100% (QA)
Studentjava public class Student private String name private int id private char gender private Stri... View the full answer
Related Book For
Modeling the Dynamics of Life Calculus and Probability for Life Scientists
ISBN: 978-0840064189
3rd edition
Authors: Frederick R. Adler
Posted Date:
Students also viewed these programming questions
-
1. Write a class called Student. This student class should have the following fields: Id: This is the Id of the student. -_scores: This is a list of scores that belong to the student. Add the...
-
Suppose the quantity of root beer demanded decreases from 105,000 litres per week to 95,000 litres per week when the price rises by 5 percent. The price elasticity of demand is Select one: O A. 10. O...
-
Student 2 comes to class with probability 1.0 if student 1 does. Student 3 ignores them. A small class has only three students. Each comes to class with probability 0.9. Find the probability that all...
-
A particular leadcadmium alloy is 8.0% cadmium by mass. What mass of this alloy, in grams, must you weigh out to obtain a sample containing 7.25 x 10 23 Cd atoms?
-
Plants take CO2 and H2O and make glucose (C6H12O6) and O2. Write a balanced thermochemical equation for this process. Use data in Table 7.2.
-
A \(0.350-\mathrm{kg}\) aluminum calorimeter contains \(0.110 \mathrm{~kg}\) of water, and both are at room temperature \(\left(20.0^{\circ} \mathrm{C} ight)\). A \(0.280-\mathrm{kg}\) block of lead...
-
Benjamin Franklin (1706-1790) conducted an experiment to study the effect of water depth on the amount of drag on a boat being pulled up a canal. He made a 14-foot trough and a model boat 6 inches...
-
The following information relates to Starbucks for the year ended October 2, 2011: net income 1,245.7 million; unrealized holding loss of $10.9 million related to available-for-sale securities during...
-
Date March 1 March 5 March 9 March 18 March 25 March 29 Activities Beginning inventory Purchase Sales Purchase Purchase Sales Totals Units Acquired at Cost $52.60 per unit 180 units 265 units 125...
-
HealthFull Nurse-Run Clinic: Table 6.2 analyzes appointments that are lost (cannot be scheduled) because of limits to capacity. However, another problem at HealthFull Clinic is cancelled...
-
Pick a topic that is interesting to you. For ideas, see the list of past communication projects. Then, either write a five-page paper, make a YouTube video, or create a Podcast about your chosen...
-
Which bond usually will have a higher liquidity premium: one issued by a large company or one issued by a small company?
-
Why have prepackaged bankruptcies become so popular in recent years?
-
Why are rates of return superior to dollar returns when comparing different potential investments?
-
Indicate whether each of the following statements is true or false by writing T or F in the answer c olumn. An inter v ivos trust is created by a will.
-
Consider the following information for a fish farm that has an infinite demand for fish produced at 5 per kg. a. Fill in all the blanks in the table. b. Verify that MRP L for the fish farm can be...
-
Research and explain the below listed components/tools which are part of the SQL server 2019 Installation Center Configuration Checker Data Migration Assistant (DMA) TOOLS AND SERVICES INSTALLED...
-
Graph one period of each function. y = 4 cos x
-
If there are n seeds, each sprouts and grows to a size s = 100.0/n. An adult of size s produces s - 1.0 seeds (because it must use 1.0 units of energy to survive). Crowded plants grow to smaller...
-
Sketch the graph of an updating function that has a corner at an equilibrium and is unstable. The unusual equilibrium in the text has an updating function that lies below the diagonal both to the...
-
For the following bacterial populations, find the average rate of change during the first hour, and during the first and second half hours. Graph the data and the secant lines associated with the...
-
The following is the distribution of the daily number of power failures reported in a western city on 300 days: Test at the 0.05 level of significance whether the daily number of power failures in...
-
With reference to Example 13, repeat the analysis after combining the categories below average and average in the training program and the categories poor and average in success. Comment on the form...
-
Mechanical engineers, testing a new arc-welding technique, classified welds both with respect to appearance and an X-ray inspection. Test for independence using \(\alpha=0.05\) and find the...
Study smarter with the SolutionInn App