Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
## I NEED HELP GETTING THIS PYTHON CODE TO FUNCTION PROPERLY##
class Patient:
def _init_(self,fname,mname,lanme,zipcode,phone,addess,city,state):
self.firstName = fname
self.middleName = mname
self.lastName = lanme
self.zip = zipcode
self.phoneNumber=phone
self.add = addess
self.city = city
self.state = state
def _str_(self):
return "Name: " +self.firstName+ " "+ self.middleName +" "+self.lastName+"\n"+"Address: "+self.add+" city: "+self.city
class Procedure:
def _init_(self, procedure, date, practitioner, charges):
self.procedureName = procedure
self.procedureDate = date
self.practitionerName = practitioner
self.charg = charges
def _str_(self):
x= float(eval(str(self.charg)))
return "Procedure Name: "+ self.procedureName+"\nDate: "+ self.procedureDate+"\nPractioner: "+ self.practitionerName+
#Patient Objecct
patient1 = Patient("Britney","Mark","Spears","40035","189030","2/78 Street 2", "abc","New York");
print("Patient Details: ")
print(patient1)
#procedure Objects
procedure1 = Procedure("Physical","12/15/2017","Dr. Irvine",250.00)
procedure2 = Procedure("X-ray","12/15/2017","Dr. Jamison",500)
procedure3 = Procedure("Blood test","12/15/2017","Dr. Smith",200)
print("Procedure#1: ")
print(procedure1)
print("Procedure#2: ")
print(procedure2)
print("Procedure#3: ")
print(procedure3)
total = procedure1.charg+procedure2.charg+procedure3.charg
print("Total charge = "+str(total))
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Identify the cause of concern with the below piece of code. class Person (object): name = None def _init_(self, name) : Person.name = name def funct(self): return "Your name is " + self.name (1) Each Person's name will be equal to the most recently created Person's name. (2) Instantiating the object of class Person will lead to an error. (3) The name of every Person will be None. (4) Invoking funct on a person instance causes an error.arrow_forwardCreate an object-oriented program that allows you to enter data for customers and employees. Console Customer/Employee Data Entry Customer or employee? (c/e): c DATA ENTRY First name: Frank Last name: Wilson Email: frank44@gmail.com Number: M10293 CUSTOMER Name: Frank Wilson Email: frank44@gmail.com Number: M10293 Continue? (y/n): y Customer or employee? (c/e): e DATA ENTRY First name: joel Last name: murach Email: joel@murach.com SSN: 123-45-6789 EMPLOYEE Name: Joel Murach Email: joel@murach.com SSN: 123-45-6789 Continue? (y/n): n Bye! Specifications ● ● Create a Person class that provides attributes for first name, last name, and email address. This class should provide a property or method that returns the person's full name. Create a Customer class that inherits the Person class. This class should add an attribute for a customer number. Create an Employee class that inherits the Person class. This class should add an attribute for a social security number (SSN). The program should…arrow_forward//in c# // I am having problem with my regex fitting the requirments using System;using System.Text.RegularExpressions; namespace UsernameProcessor.Question{ public sealed class UsernameProcessorService{ /// <summary> /// Requirements: /// - A valid username shall be at least 4 characters. /// - A valid username shall contain only letters, numbers and an optional underscore. /// - A valid username shall start with a letter, and shall not end with an underscore. /// </summary> /// <param name="username"></param> /// <returns>Whether or not the username is valid per the above requirements.</returns> private static Regex sUserNameAllowedRegEx = new Regex(@"^(?=[a-zA-Z])[-\w.]{0,23}([a-zA-Z\d])$", RegexOptions.Compiled); private static Regex sUserNameIllegalEndingRegEx = new Regex(@"(\-_)$", RegexOptions.Compiled); public static bool IsValidUsername(string username) { if (string.IsNullOrEmpty(username) ||…arrow_forward
- Java programming This problem set will test your knowledge of System I/O, and variable assignment. Your task is to create several different java classes (.java files) that will produce a specific output based on the user input. All input will be given to you either as a command-line argument or typed in from the keyboard. Below you will find directions for each class you need to create. Please make sure that the class name and java file name match the name 1, ContainsAnyCase This program will accept two user inputted values that are strings. The first user input will be a single word the second user input will be a sentence of random words. This program should print "true" if the first word is in the sentence of words regardless of the casing. In other words case is ignored when checking if the word is within the sentence. The last string that this program should print is "true" or "false", nothing else. 2 PrintMathResult Write an application that will wait for three user inputted…arrow_forwardCode : PYTHON PLEASE ANSWER FASTarrow_forwardWritten in Python with docstring please if applicable Thank youarrow_forward
- using c++ ,Create class “Student” with the following fields: FirstName, LastName, MiddleName, DateOfBirth, Gender, UGCode, HomeAddress, and Email The “DateOfBirth” field should have the “Date” type (developed in the first task) The “HomeAddress” field should have the “Address” type (developed in the previous task) Fields FirstName, LastName, MiddleName should have “char *” type and be allocated dynamically (using the new operator) Add a default constructor Add the overloaded constructor(s) Add the copy constructor Add the destructor Overload the output operator “>>” globally for “cout” function Create Instance of the Student class using your actual dataarrow_forwardNeed help implenting the classes below in Python 3 Please take a close look at the UML diagram as well as the requirements of the classes.arrow_forwardNote: Use C# programming language You only need to do the 1st specificationarrow_forward
- Python will give you high rating for correct help Easy Python Problem (see pic): Guides are available on the template below on what code to put: Template: ### Use this templateimport random class Card: def __init__(self, value, suite): self.value = value self.suite = suite def __str__(self): return f"{self.value} of {self.suite}" def __eq__(self, other): """Check if two cards are the same""" # -- YOUR CODE HERE -- class CardSet: def __init__(self): self.cards = [] def view(self): for card in self.cards: print(card) def add_cards(self, cards): """Add cards to your set""" # -- YOUR CODE HERE -- class Deck(CardSet): def __init__(self): """Initialize the 52-card set. Start from 1-11, then Jack, Queen, King, then by suite: clubs, spades, hearts, diamonds""" cards = [] # -- YOUR CODE HERE -- self.cards = cards def count_cards(self): """"Count the number…arrow_forwardpython: class Student:def __init__(self, first, last, gpa):self.first = first # first nameself.last = last # last nameself.gpa = gpa # grade point average def get_gpa(self):return self.gpa def get_last(self):return self.last class Course:def __init__(self):self.roster = [] # list of Student objects def add_student(self, student):self.roster.append(student) def course_size(self):return len(self.roster) # Type your code here if __name__ == "__main__":course = Course()course.add_student(Student('Henry', 'Nguyen', 3.5))course.add_student(Student('Brenda', 'Stern', 2.0))course.add_student(Student('Lynda', 'Robison', 3.2))course.add_student(Student('Sonya', 'King', 3.9)) student = course.find_student_highest_gpa()print('Top student:', student.first, student.last, '( GPA:', student.gpa,')')arrow_forwardIn C++ Create a new project named lab9_1 . You will need to implement a Course class. Here is its UML diagram: Course - department : string- course_num : string- section : int- num_students : int- is_full : bool + Course()+ Course(string, string, int, int)+ setDepartment(string) : void+ setNumber(string) : void+ setSection(int) : void+ setStudents(int) : void+ getDepartment() const : string+ getNumber() const : string+ getSection() const : int+ getStudents() const : int+ print() const : void Create a sample file to read from: CSS 2A 1111 35 Additional information: The Course class has two constructors. Make sure you have default values for your default constructor. Each course maxes out at 40 students. Therefore, you need to make sure that there aren’t more than 40 students in a Course. You can choose how you handle situations where more than 40 students are added. Additionally, you should automatically set is_full to false or true, based on the number of…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education