Write a class named Person with data attributes for a person’s first name, last name, and telephone number. Next, write a class named Customer that is a subclass of the Person class. The Customer class should have a data attribute for a customer number and a Boolean data attribute indicating whether the customer wishes to be on a calling list. Demonstrate an instance of the Customer class in a simple program.
Using python
In: Computer Science
Name a branch of psychology that has produced multiple laws. For full credit name at least three laws from one particular branch of psychology.
In: Psychology
Create a new file name condition_quiz.py.
Add a comment with your name and the date.
Prompt the user to enter the cost. Convert the input to a float.
Prompt the user for a status. Convert the status to an integer
Compute the special_fee based on the status.
If the status is 0, the special_fee will be 0.03 of the cost.
Else if the status is 1, the special_fee will be 0.04 of the cost.
Else if the status is 2, the special_fee will be 0.06 of the cost.
Else if the status is 3 or 4, the special_fee, the special_fee will be 0.07 of the cost.
Otherwise, the special_fee will be 0.10 of the cost.
Compute the total_cost as the cost plus the special_fee. Print out the total_cost with two decimal places of precision.
In: Computer Science
Using C#:
Write a class named Employee that has the following properties:
The class should have the following overloaded constructors:
In an application, create three Employee objects to hold the following data:
Name IdNumber Department Position
Susan Myers 47899 Accounting Vice President
Mark Jones 39119 IT Programmer
Joy Rogers 81774 Manufacturing Engineer
The application should store this data in the three objects and display the data for each employee on the screen.
In: Computer Science
python
Create a new file name condition_quiz.py.
Add a comment with your name and the date.
Prompt the user to enter the cost. Convert the input to a float.
Prompt the user for a status. Convert the status to an integer
Compute the special_fee based on the status.
If the status is 0, the special_fee will be 0.03 of the cost.
Else if the status is 1, the special_fee will be 0.04 of the cost.
Else if the status is 2, the special_fee will be 0.06 of the cost.
Else if the status is 3 or 4, the special_fee, the discount will be 0.07 of the cost.
Otherwise, the special_fee will be 0.10 of the cost.
Compute the total_cost as the cost plus the special_fee. Print out the total_cost with two decimal places of precision.
In: Computer Science
Write a program that utilizes a Professor class. A professor has a first name, last name, affiliation, easiness grade, and a helpfulness grade. Grades range from 1 (lowest) to 5 (highest). The Professor class has two constructors. The first constructor initiates the object with just the first name, the last name, and the affiliation. The default value for easiness and helpfulness grade is 3. The second constructor initiates the object using the first name, the last name, the affiliation, and two grades.
The Professor class must not allow a first name or last name to be changed after instantiation.
The affiliation should be implemented as a property.
The grades should have both an accessor method and a mutator method. The Professor class should have a display method that prints all member variables in an appropriate format. For example, you can print out the first name, the last name, affiliation, and the two grades from the display method.
The Professor class should have a ToString() method. Make sure to override the ToString() method to present something meaningful.
Lastly, you should use the Main() method to demonstrate how the Professor class works. For example, create an instance of the Professor class with one of its two constructors. And then, invoke the display method on the instance.
Were using Visual Studios C# console.
This is the program requirements we are working on.
Can you write comments that explain the steps? Or how you get
the result for the steps you write.
In: Computer Science
Name the types of consumer products, explain the difference between them. Name a product for each and explain how the type influences the distribution and promotion strategy.
In: Operations Management
1. Name a company that practices horizontal integration and describe the structure.
2. Name a company that practices vertical integration and describe the structure.
3. In your opinion, which is better to work for? Which offers workers the better opportunity to better yourself?
4. If you owned the business, which would you implement? Think again about the workers opportunities. Does their betterment also mean what’s best for your business?
In: Operations Management
Python Code:
If the GPA is >= 3.5, display 'Dean’s List'
If the GPA is < 2.0, display 'Dismissed’
If the GPA is < 3.5 and >= 2.0, display 'Regular Standing'
The data is as follows:
Mohammed James 012345 94 3.2
Priya Jones 112245 45 3.9
George Wayne 013265 18 1.9
Jennifer Fulton 121378 30 2.0
Ayesha Smith 043245 64 3.5
In: Computer Science
import java.util.Scanner;
import java.io.*;
import java.util.ArrayList;
public class Students
{
public static void main (String[] args) throws IOException
{ String first_name, last_name;
int grade, count=0;
Scanner fileInput = new Scanner(new File("students.txt"));
//Object st;
ArrayList<Student> st = new ArrayList<Student>();
while (fileInput.hasNext())
{
first_name = fileInput.next();
last_name = fileInput.next();
grade = fileInput.nextInt();
if (grade>89)
st.add(new Excellent(first_name, last_name, grade));
else
st.add(new Ok(first_name, last_name, grade));
count++;
}
for (int i=0; i<st.size(); i++)
{
if (st.get(i) instanceof Excellent)
st.get(i).info();
else
st.get(i).info();
}
System.out.println("There are " + count + " students");
}
}
public class Ok implements Student
{
private String fname, lname;
private int grade;
public Ok(String fname, String lname, int grade)
{
this.fname = fname;
this.lname = lname;
this.grade = grade;
}
public void info()
{
System.out.println(fname + " " + lname + " "+ grade + "\t" +
"ok");
}
}
public class Excellent implements Student
{
private String fname, lname;
private int grade;
public Excellent(String fname, String lname, int grade)
{
this.fname = fname;
this.lname = lname;
this.grade = grade;
}
public void info()
{
System.out.println(fname + " " + lname + " "+ grade + "\t" +
"excellent");
}
}
public interface Student
{
void info();
}
In: Computer Science