Question

In: Computer Science

Consider a cofee shop located at XYZ University, which is managed by a student association. Some...

Consider a cofee shop located at XYZ University, which is managed by a student association. Some students work as a manager, in the kitchen, customer service etc. You can consider all students workers as a general term "student_employee."

Design a UML class for "student-employee," code in C#, create two sample objects ans ahow ingeritances from student to the student_employee.

Solutions

Expert Solution

UML DIAGRAM:

PROGRAM IN C#:

using System;
class CofeeShop{
static void Main() {
Manager manager=new Manager(){StudentId="1",StudentName="Santosh"};
manager.Work();
Chef chef=new Chef(){StudentId="2",StudentName="Amol"};
chef.Work();
Customer_Service waiter=new Customer_Service(){StudentId="3",StudentName="satish"};
waiter.Work();

}
}

public abstract class Student_Employee
{
public string StudentId{get;set;}
public string StudentName{get;set;}
public string Designation{get;set;}
public abstract void Work();
}

public class Manager:Student_Employee
{
public Manager()
{
Designation="Manager";
}

// we will implement in this work assign to Manager
public override void Work()
{

}
}

public class Chef:Student_Employee
{
public Chef()
{
Designation="Chef";
}
// we will implement in this work assign to Chef
public override void Work()
{

}
}

public class Customer_Service:Student_Employee
{

public Customer_Service()
{
Designation="Student_Employee";
}
// we will implement in this work assign to customer service
public override void Work()
{

}
}


Related Solutions

The Student Government Association at SLAY University wanted to demonstrate the relation ship between the number...
The Student Government Association at SLAY University wanted to demonstrate the relation ship between the number of beers a student drink and their blood alcohol content (BAC). A random sample of 18 students participated in a study in which each student was randomly assigned a number of cans of beers to drink. 30 minutes later their BAC was measured. Answer the following questions. Use alpha .05 for the test statistic. Beers BAC 6 .10 3 .12 4 .10 7 .09...
The Student Government Association at Middle Carolina University wanted to demonstrate the relationship between the number...
The Student Government Association at Middle Carolina University wanted to demonstrate the relationship between the number of beers a student drinks and his or her blood alcohol content (BAC). A random sample of 18 students participated in a study in which each participating student was randomly assigned a number of 12-ounce cans of beer to drink. Thirty minutes after they consumed their assigned number of beers, a member of the local sheriff’s office measured their blood alcohol content. The sample...
Consider randomly selecting a student at a large university, and let "A" be the event that...
Consider randomly selecting a student at a large university, and let "A" be the event that the selected student has a Visa card and "B" be the analogous event for MasterCard. Suppose that P(A)=0.6 and P(B)=0.4. a) Could it be the case that P(A and B)=0.5? Why or why not?
Consider randomly selecting a student at a large university, and let A be the event that...
Consider randomly selecting a student at a large university, and let A be the event that the selected student has a Visa card and B be the analogous event for MasterCard. Suppose thatP(A) = 0.7and P(B) = 0.3. (a)Could it be the case thatP(A ∩ B) = 0.5? Why or why not? (b) From now on, suppose thatP(A ∩ B) = 0.2. What is the probability that the selected student has at least one of these two types of cards?...
Consider randomly selecting a student at a large university. Let A be the event that the...
Consider randomly selecting a student at a large university. Let A be the event that the selected student has a Visa card, let B be the analogous event for MasterCard, and let C be the event that the selected student has an American Express card. Suppose that P(A) = 0.6,P(B) = 0.4,and P(A ∩ B) = 0.3,suppose that P(C) = 0.2,P(A ∩ C) = 0.12,P(B ∩ C) = 0.1, and P(A ∩ B ∩ C) = 0.08. a)What is the...
At a university, each student is assigned a system login name, which the student uses to...
At a university, each student is assigned a system login name, which the student uses to log into the campus computer system. Write the code that generates system login names for students. You will use the following algorithm to generate a login name: Get the first three characters of the student’s first name. (If the first name is less than three characters in length, use the entire first name.) Get the first three characters of the student’s last name. (If...
Chapter Case: Campus Bikes Campus Bikes is a popular bicycle shop located near a major university....
Chapter Case: Campus Bikes Campus Bikes is a popular bicycle shop located near a major university. The business has grown and the owner, Mark Turner, wants to install an up-to-date computer system to handle all business functions. Background Campus Bikes sells several brands of new bikes, including everything from high-end racing models to beach cruisers. In addition to sales of new bikes and accessories, Mark’s service department is always busy. The staff includes Mark himself, a bookkeeper, two part-time sales...
Variables: Region, Preferred_Status Is there an association between the state in which a student lives and...
Variables: Region, Preferred_Status Is there an association between the state in which a student lives and the student's preferred status? H0: The state in which a student lives and a student's preferred status are not associated. HA: The state in which a student lives and a student's preferred status are associated. Contingency table results: Rows: Region, Columns: Preferred_Status Cell format Count (Expected count) Happy & Healthy Rich & Famous Total CA 201 (199.5) 60 (61.5) 261 SC 65 (66.5) 22...
Scenario: You are the member of a student organization at Northeast State University which works to...
Scenario: You are the member of a student organization at Northeast State University which works to provide professional development opportunities for students. You saw an interesting article in a college magazine describing a “Suitable Suits” program another university implemented. Its career development office kept a closet with 21 crisp black suits of all sizes that students could borrow for job interviews. Students would make an appointment with the office and agree to dry clean the suits before returning them. The...
Consider the market for tutoring at a university. If the price of tutoring increases, which of...
Consider the market for tutoring at a university. If the price of tutoring increases, which of the following occur? A. The demand for tutoring increases B. The demand for tutoring decreases C. The quantity demanded for tutoring increases D. The quantity demanded for tutoring decreases 4. Consider the market for tutoring at a university. If enrollment at the university increases, which of the following occur? A. The demand for tutoring increases B. The demand for tutoring decreases C. The quantity...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT