Yanbu University College Applied Computer Science (ACS) Introduction to Computer Science (CS 102) Lab Exercise 10
|
|
- Nancy Robinson
- 6 years ago
- Views:
Transcription
1 Yanbu University College BACHELOR OF SCIENCE IN Applied Computer Science (ACS) Introduction to Computer Science (CS 102) Third Semester Academic Year Lab Exercise 10 Course Instructor: Mohammed Rafi / Rasheed Ricardo 1. Create an abstract class Staff which has two protected instance variables staffcode type String, staffname type String and performs the following tasks. variable. b. Provide get and set methods for each of the instance variables. c. Provide an abstract method name calsalary and return type is double. d. Provide a method tostring to return the staffcode and staffname. Create a class Engineering which inherits from the Staff and has two instance variables experience type int and salary type double and performs the following tasks. b. Add a method called calsalary which returns the calculated salary depending on experience. If the experience is zero it return the same salary, if the experience is > 2 and <= 4 it will return (salary + salary * 0.10) and else it will return (salary + salary * 0.50). c. Add a method called tostring which returns to return the staffcode, staffname, experience, and calculated salary. Create a class StaffApp which performs the following tasks. a. Read the staffcode, staffname, experience and salary from the user. b. Create an object for Enineering. c. Display the information 1
2 2. Create a class StaffApp which performs the following tasks. a. Create an array objects for Engineering using ArrayList b. Read the staffcode, staffname, experience and salary from the user until staff code is n. c. Display the information 3. 2
3 4. Write a test application MovableTest to test the methods moveup(), movedown(), moveleft(), moveright(). 5. Create abstract class Employee with two instance variables name type string, ssn type string and perform the following tasks. a. Provide a parameterized constructor which initializes the two instance variables. b. Provide get and set methods for each of the instance variables. c. Provide abstract method earnings which returns double. d. Provide a tostring method which returns the Name and ssn of the employee. Create a class SalariedEmployee which inherits from abstract class Employee and has instance variable weeklysalary type double and perform the following tasks. b. Provide get and set methods for weeklysalary. If the salary < 0 then the weekslary is set 0.0 or else set to salary. c. Provide earnings method which returns the weeksalary. 3
4 d. Provide a tostring method which return the name, ssn and earnings. Create a class HourlyEmployee which inherits from abstract class Employee and has two instance variable hourlywage type double and hours type double and perform the following tasks. b. Provide get and set methods for hourlywage and hours. If the hourlywage < 0 then the hourlywage is set 0.0 or else set to hourlywage. If the hoursworked >= 0.0 and <= the hours set to hoursworked or else 0.0 c. Provide earnings method which performs the following. It returns hourlywage * 40 if hours < 40 or else returns 40 * hourlywage + (hours 40) * wage * 1.5 d. Provide a tostring method which return the name, ssn hourlywage, hours and earnings. Create an application called payroll which creates an object for above two subclasses and prints the information. 6. Create an interface named payable which has one method named getpaymentamout and returns double. Create a class invoice to represent a simple invoice that contains billing information of only one kind of part. The class has four instance variables partnumber type string, partdescription type String, quantity type integer, priceperitem type double, this is class is implemented form the payable interface and performs the following tasks. a. Provide a parameterized constructor which takes four parameters and initializes the instance variables. b. Provide set and get methods for each of the instance variables. The set method for the quantity checks the 4
5 quantity if it is less than 0.0 set to 0 or else set the quantity. The set method for the priceperitem checks for the price if the price is less than 0 it sets to 0.0 or else set the price. c. Provide a tostring method which returns partnumber, partdescription, quantity, priceperitem. d. Provide a method getpaymentamount which calculates and returns the calculated value. Quantity * PricePerItem Create a test application named PayableInterfaceInoviceTest which creates array of objects for the class invoice and prints the information. 7. Create an interface named payable1 which has one method named getpaymentamout and returns double. Create abstract class Employee1 with two instance variables name type string, ssn type string and perform the following tasks. a. Provide a parameterized constructor which initializes the two instance variables. b. Provide get and set methods for each of the instance variables. c. Provide a tostring method which returns the Name and ssn of the employee. Create a class SalariedEmployee1 which inherits from abstract class Employee and has instance variable weeklysalary type double and perform the following tasks. 5
6 b. Provide get and set methods for weeklysalary. If the salary < 0 then the weekslary is set 0.0 or else set to salary. c. Provide getpaymentamount method which returns the weeksalary. d. Provide a tostring method which return the name, ssn and earnings. Create a test application named PayableInterfaceTest which creates array of objects for the classes invoice and SalariedEmployee and prints the information. Increase the weeklysalary of each of SalariedEmployee by 10% and the SalariedEmployee. 6
7 7
final Methods and Classes
1 2 OBJECTIVES In this chapter you will learn: The concept of polymorphism. To use overridden methods to effect polymorphism. To distinguish between abstract and concrete classes. To declare abstract methods
More informationObject-Oriented Programming: Polymorphism Pearson Education, Inc. All rights reserved.
1 10 Object-Oriented Programming: Polymorphism 2 A Motivating Example Employee as an abstract superclass. Lots of different types of employees (well, 4). Executing the same code on all different types
More informationObject-Oriented Programming: Polymorphism
10 One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them. John Ronald Reuel Tolkien General propositions do not decide concrete cases. Oliver Wendell
More informationCS111: PROGRAMMING LANGUAGE II
1 CS111: PROGRAMMING LANGUAGE II Computer Science Department Lecture 8(a): Abstract Classes Lecture Contents 2 Abstract base classes Concrete classes Dr. Amal Khalifa, 2014 Abstract Classes and Methods
More informationObject-Oriented Programming: Polymorphism
Object-Oriented Programming: Polymorphism By Harvey M. Deitel and Paul J. Deitel Jun 1, 2009 Sample Chapter is provided courtesy of Prentice Hall 10.1 Introduction We now continue our study of object-oriented
More informationWEEK 13 EXAMPLES: POLYMORPHISM
WEEK 13 EXAMPLES: POLYMORPHISM CASE STUDY: PAYROLL SYSTEM USING POLYMORPHISM Use the principles of inheritance, abstract class, abstract method, and polymorphism to design a payroll project for a car lot.
More informationCS 209 Sec. 52 Spring, 2006 Lab 6 - B: Inheritance Instructor: J.G. Neal
CS 209 Sec. 52 Spring, 2006 Lab 6 - B: Inheritance Instructor: J.G. Neal Objectives. To gain experience with: 1. The creation of a simple hierarchy of classes. 2. The implementation and use of inheritance.
More informationCS 209 Spring, 2006 Lab 8: GUI Development Instructor: J.G. Neal
CS 209 Spring, 2006 Lab 8: GUI Development Instructor: J.G. Neal Objectives: To gain experience with the programming of: 1. Graphical user interfaces (GUIs), 2. GUI components, and 3. Event handling (required
More informationJava How to Program, 8/e
Java How to Program, 8/e Polymorphism Enables you to program in the general rather than program in the specific. Polymorphism enables you to write programs that process objects that share the same superclass
More informationCSE 530A. ER Model. Washington University Fall 2013
CSE 530A ER Model Washington University Fall 2013 Database Design Requirements Analysis Conceptual Database Design Creates an abstract model Logical Database Design Converts abstract model to concrete
More informationObject Oriented Programming with C++ (24)
Object Oriented Programming with C++ (24) Zhang, Xinyu Department of Computer Science and Engineering, Ewha Womans University, Seoul, Korea zhangxy@ewha.ac.kr Polymorphism (II) Chapter 13 Outline Review
More informationChapter 7. Inheritance
Chapter 7 Inheritance Introduction to Inheritance Inheritance is one of the main techniques of objectoriented programming (OOP) Using this technique, a very general form of a class is first defined and
More informationEnhanced Entity- Relationship Models (EER)
Enhanced Entity- Relationship Models (EER) LECTURE 3 Dr. Philipp Leitner philipp.leitner@chalmers.se @xleitix LECTURE 3 Covers Small part of Chapter 3 Chapter 4 Please read this up until next lecture!
More informationCS111: PROGRAMMING LANGUAGE II
1 CS111: PROGRAMMING LANGUAGE II Computer Science Department Lecture 4(b): Subclasses and Superclasses OOP OOP - Inheritance Inheritance represents the is a relationship between data types (e.g. student/person)
More informationPolymorphism (Deitel chapter 10) (Old versions: chapter 9)
Polymorphism (Deitel chapter 10) (Old versions: chapter 9) 1 2 Plan Introduction Relationships Among Objects in an Inheritance Hierarchy Polymorphism Examples Abstract Classes and Methods Example: Inheriting
More informationLecture Contents CS313D: ADVANCED PROGRAMMING LANGUAGE. What is Inheritance?
CS313D: ADVANCED PROGRAMMING LANGUAGE Computer Science department Lecture 5: Inheritance & Polymorphism Lecture Contents 2 What is Inheritance? Super-class & sub class Protected members Creating subclasses
More informationCS112 Lecture: Inheritance and Polymorphism
CS112 Lecture: Inheritance and Polymorphism Last revised 4/10/08 Objectives: 1. To review the basic concept of inheritance 2. To introduce Polymorphism. 3. To introduce the notions of abstract methods,
More informationCS 338 The Enhanced Entity-Relationship (EER) Model
CS 338 The Enhanced Entity-Relationship (EER) Model Bojana Bislimovska Spring 2017 Major research Outline EER model overview Subclasses, superclasses and inheritance Specialization and generalization Modeling
More informationCS313D: ADVANCED PROGRAMMING LANGUAGE
CS313D: ADVANCED PROGRAMMING LANGUAGE Computer Science department Lecture 5: Inheritance & Polymorphism Lecture Contents 2 What is Inheritance? Super-class & sub class Protected members Creating subclasses
More informationCSCI 200 Lab 2 Inheritance, Polymorphism & Data Streams
CSCI 200 Lab 2 Inheritance, Polymorphism & Data Streams In this lab you will write a set of simple Java interfaces and classes that use inheritance and polymorphism. You will also write code that uses
More informationObject Oriented Relationships
Lecture 3 Object Oriented Relationships Group home page: http://groups.yahoo.com/group/java CS244/ 2 Object Oriented Relationships Object oriented programs usually consisted of a number of classes Only
More information第三章习题答案 // include definition of class GradeBook from GradeBook.h #include "GradeBook.h"
第三章习题答案 3.11 // Exercise 3.11 Solution: GradeBook.h // Definition of GradeBook class that stores an instructor's name. #include // program uses C++ standard string class using std::string; //
More informationWrite a java program to prints the count of odd and even no s entered.
Dated: 27-01-2014 ALIGARH MUSLIM UNIVERSITY Department of Computer Science CS-2P1: Object Oriented Programming Using JAVA Java Lab Assignment Course: MCA (Semester-II nd ) Academic Session: 2013-2014 Note:
More informationCS111: PROGRAMMING LANGUAGE II
CS111: PROGRAMMING LANGUAGE II Computer Science Department Lecture 4&5: Inheritance Lecture Contents What is Inheritance? Super-class & sub class The object class Using extends keyword @override keyword
More informationUNIVERSITI SAINS MALAYSIA. CIT502 Object-Oriented Programming and Software Engineering
UNIVERSITI SAINS MALAYSIA First Semester Examination Academic Session 2003/2004 September/October 2003 CIT502 Object-Oriented Programming and Software Engineering Duration : 3 hours INSTRUCTION TO CANDIDATE:
More informationExam Duration: 2hrs and 30min Software Design
Exam Duration: 2hrs and 30min. 433-254 Software Design Section A Multiple Choice (This sample paper has less questions than the exam paper The exam paper will have 25 Multiple Choice questions.) 1. Which
More information9/10/2018 Programming Data Structures Inheritance
9/10/2018 Programming Data Structures Inheritance 1 Email me if the office door is closed 2 Introduction to Arrays An array is a data structure used to process a collection of data that is all of the same
More informationIS 0020 Program Design and Software Tools
1 IS 0020 Program Design and Software Tools Polymorphism Lecture 8 September 28/29, 2004 Introduction 2 Polymorphism Program in the general Derived-class object can be treated as base-class object is -a
More informationCS 209 Spring, 2006 Lab 11: Files & Streams Instructor: J.G. Neal
CS 209 Spring, 2006 Lab 11: Files & Streams Instructor: J.G. Neal Objectives: To gain experience with basic file input/output programming. Note: 1. This lab exercise corresponds to Chapter 16 of the textbook.
More informationModule Contact: Dr Taoyang Wu, CMP Copyright of the University of East Anglia Version 1
UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 2016-17 PROGRAMMING FOR NON-SPECIALISTS CMP-5020B Time allowed: 2 hours Section A (Attempt all questions: 80 marks) Section
More informationJava Programming Lecture 7
Java Programming Lecture 7 Alice E. Fischer Feb 16, 2015 Java Programming - L7... 1/16 Class Derivation Interfaces Examples Java Programming - L7... 2/16 Purpose of Derivation Class derivation is used
More informationCS313D: ADVANCED PROGRAMMING LANGUAGE
CS313D: ADVANCED PROGRAMMING LANGUAGE Computer Science department Lecture 4(b): Inheritance & Polymorphism Lecture Contents What is Inheritance? Super-class & sub class The object class Using extends keyword
More informationInheritance Motivation
Inheritance Inheritance Motivation Inheritance in Java is achieved through extending classes Inheritance enables: Code re-use Grouping similar code Flexibility to customize Inheritance Concepts Many real-life
More informationHigh-Level Database Models (ii)
ICS 321 Spring 2011 High-Level Database Models (ii) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 1 Logical DB Design: ER to Relational Entity sets to
More informationCSE Lab 7 Assignment
CSE 1341 - Lab 7 Assignment Pre-Lab There is no pre-lab this week. Lab (100 points)! The objective of Lab 7 is to create a new variation of the Spinner game you created in Lab 6. For this lab, you will
More informationChapter (4) Enhanced Entity-Relationship and Object Modeling
Chapter (4) Enhanced Entity-Relationship and Object Modeling Objectives Concepts of subclass and superclass and the related concepts of specialization and generalization. Concept of category, which is
More informationCS100J, Fall 2003 Preparing for Prelim 1: Monday, 29 Sept., 7:30 9:00PM
CS100J, Fall 2003 Preparing for Prelim 1: Monday, 29 Sept., 7:30 9:00PM This handout explains what you have to know for the first prelim. Terms and their meaning Below, we summarize the terms you should
More informationAnnouncement. Agenda 7/31/2008. Polymorphism, Dynamic Binding and Interface. The class will continue on Tuesday, 12 th August
Polymorphism, Dynamic Binding and Interface 2 4 pm Thursday 7/31/2008 @JD2211 1 Announcement Next week is off The class will continue on Tuesday, 12 th August 2 Agenda Review Inheritance Abstract Array
More informationALIGARH MUSLIM UNIVERSITY Department of Computer Science. JAVA Lab Assignment Course: MCA II nd Semester Academic Session:
ALIGARH MUSLIM UNIVERSITY Department of Computer Science Dated: 25-01-2016 JAVA Lab Assignment Course: MCA II nd Semester Academic Session: 2015-2016 CSM-241: Object Oriented Programming Using JAVA Note:
More informationObject Oriented Design
Object Oriented Design Chapter 12 continue 12.6 Case Study: Payroll System Using Polymorphism This section reexamines the CommissionEmployee- BasePlusCommissionEmployee hierarchy that we explored throughout
More informationCS 209 Sec. 52 Spring, 2006 Lab 5: Classes Instructor: J.G. Neal
CS 209 Sec. 52 Spring, 2006 Lab 5: Classes Instructor: J.G. Neal Objectives. To gain experience with: 1. The definition and use of a class to represent a real-world type of entity (an employee). 2. Adding
More informationJava. Classes 3/3/2014. Summary: Chapters 1 to 10. Java (2)
Summary: Chapters 1 to 10 Sharma Chakravarthy Information Technology Laboratory (IT Lab) Computer Science and Engineering Department The University of Texas at Arlington, Arlington, TX 76019 Email: sharma@cse.uta.edu
More informationJob Aid Submit a Direct Retro at UCLA
October 10, 2018 UCLA UCPATH Job Aid Submit a Direct Retro at UCLA Submit a Direct Retro Use this to submit a direct retro transaction. Direct Retros are used to move salary expense in UCPath from one
More informationChapter 14. Inheritance. Slide 1
Chapter 14 Inheritance Slide 1 Learning Objectives Inheritance Basics Derived classes, with constructors protected: qualifier Redefining member functions Non-inherited functions Programming with Inheritance
More informationIntroduction to Object-Oriented Programming
Polymorphism 1 / 19 Introduction to Object-Oriented Programming Today we ll learn how to combine all the elements of object-oriented programming in the design of a program that handles a company payroll.
More informationLab 10: Inheritance (I)
CS2370.03 Java Programming Spring 2005 Dr. Zhizhang Shen Background Lab 10: Inheritance (I) In this lab, we will try to understand the concept of inheritance, and its relation to polymorphism, better;
More informationChapter 14 Inheritance. GEDB030 Computer Programming for Engineers Fall 2017 Euiseong Seo
Chapter 14 Inheritance 1 Learning Objectives Inheritance Basics Derived classes, with constructors Protected: qualifier Redefining member functions Non-inherited functions Programming with Inheritance
More informationFrom ER to Relational Model. Book Chapter 3 (part 2 )
From ER to Relational Model Book Chapter 3 (part 2 ) Logical DB Design: ER to Relational Translate Entity sets to tables: ssn name Employees lot CREATE TABLE Employees (ssn CHAR(11), name CHAR(20), lot
More informationName: CS 159 Practice Final Fall 2015
Name: CS 159 Practice Final Fall 2015 CS 159, Fall 2015 Final Exam Section 02 Page 2 of 16 1. Choose the best answer for each of the following multiple choice questions. (a) (2 points) What will happen
More informationPolymorphism. Chapter 4. CSC 113 King Saud University College of Computer and Information Sciences Department of Computer Science. Dr. S.
Chapter 4 Polymorphm CSC 113 King Saud University College Computer and Information Sciences Department Computer Science Objectives After you have read and studied th chapter, you should be able to Write
More informationFirst Name: AITI 2004: Make-up Exam 1 July 9, Last Name:
First Name: AITI 2004: Make-up Exam 1 July 9, 2004 Last Name: Read Instructions Carefully! This is a 2 hour closed book exam. No calculators are allowed. Please write clearly if we cannot understand your
More informationChapter 2a Class Relationships
Data Structures for Java William H. Ford William R. Topp Chapter 2a Class Relationships Bret Ford 2005, Prentice Hall Wrapper Classes Convert a value of primitive type to an object. Supply methods to access
More informationSoftware and Programming 1
Software and Programming 1 Week 9 Lab - Use of Classes and Inheritance 8th March 2018 SP1-Lab9-2018.ppt Tobi Brodie (Tobi@dcs.bbk.ac.uk) 1 Lab 9: Objectives Exercise 1 Student & StudentTest classes 1.
More informationconditional statements
L E S S O N S E T 4 Conditional Statements PU RPOSE PROCE DU RE 1. To work with relational operators 2. To work with conditional statements 3. To learn and use nested if statements 4. To learn and use
More informationCopyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4-1
Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4-1 Chapter 4 Enhanced Entity-Relationship (EER) Modeling Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Chapter Outline EER stands for
More informationMIS Database Systems Entity-Relationship Model.
MIS 335 - Database Systems Entity-Relationship Model http://www.mis.boun.edu.tr/durahim/ Ahmet Onur Durahim Learning Objectives Database Design Main concepts in the ER model? ER Diagrams Database Design
More informationThe Entity-Relationship Model
The Entity-Relationship Model Chapter 2 Instructor: Vladimir Zadorozhny vladimir@sis.pitt.edu Information Science Program School of Information Sciences, University of Pittsburgh 1 Database: a Set of Relations
More informationChapter 4. Enhanced Entity- Relationship Modeling. Enhanced-ER (EER) Model Concepts. Subclasses and Superclasses (1)
Chapter 4 Enhanced Entity- Relationship Modeling Enhanced-ER (EER) Model Concepts Includes all modeling concepts of basic ER Additional concepts: subclasses/superclasses, specialization/generalization,
More informationCSE 1325 Project Description
CSE 1325 Summer 2016 Object-Oriented and Event-driven Programming (Using Java) Instructor: Soumyava Das Project III Assigned On: 7/12/2016 Due on: 7/25/2016 (before 11:59pm) Submit by: Blackboard (1 folder
More informationRevised Guidelines for B.A. Programme Semester II Paper: Database Management System (Meeting held on 15 th Jan 2015)
Revised Guidelines for B.A. Programme Semester II Paper: Database Management System (Meeting held on 15 th Jan 2015) Theory Theory Periods 4 periods/ week Tutorial - 1 period / 15 days Theory Paper Marks
More informationName: CS 159 Practice Final Fall 2015
Name: CS 159 Practice Final Fall 2015 CS 159, Fall 2015 Final Exam Section 02 Page 2 of 17 1. Choose the best answer for each of the following multiple choice questions. (a) (2 points) What will happen
More informationCS 215 Software Design Sample midterm solutions
Software Design Sample midterm solutions 1. The administration at Happy Valley School District is redesigning the software that manages information about its students. It has identified an abstract class
More informationConceptual Data Models for Database Design
Conceptual Data Models for Database Design Entity Relationship (ER) Model The most popular high-level conceptual data model is the ER model. It is frequently used for the conceptual design of database
More informationNetbeans tutorial:
COE808 Lab2 Prelab preparation Before coming to the lab you should: 1. Read the lab. The most recent version can be found at the URL: www.ee.ryerson.ca/~courses/coe808 2. Try to prepare any questions you
More informationProgramming in the large
Inheritance 1 / 28 Programming in the large Software is complex. Three ways we deal with complexity: Abstraction - boiling a concept down to its essential elements, ignoring irrelevant details Decomposition
More informationDynamics GP SmartList Lab. Matt Mason
Dynamics GP SmartList Lab Matt Mason mmason@manersolutions.com Exercise 1 - Warmup Exercise Income Statement Accounts Open SmartList Screen: Microsoft Dynamics GP SmartList Choose + next to Financial
More informationThis exam is open book. Each question is worth 3 points.
This exam is open book. Each question is worth 3 points. Page 1 / 15 Page 2 / 15 Page 3 / 12 Page 4 / 18 Page 5 / 15 Page 6 / 9 Page 7 / 12 Page 8 / 6 Total / 100 (maximum is 102) 1. Are you in CS101 or
More informationBCIS 3630 Dr. GUYNES SPRING 2018 TUESDAY SECTION [JAN version] GRADER COURSE WEBSITE
COURSE WEBSITE http://www.steveguynes.com/bcis3630/bcis3630/default.html Instructor: Dr. Guynes Office: BLB 312H Phone: (940) 565-3110 Office Hours: By Email Email: steve.guynes@unt.edu TEXTBOOK: Starting
More informationLesson 14: Abstract Classes and Interfaces March 6, Object-Oriented S/W Development with Java CSCI 3381
Lesson 14: Abstract Classes and Interfaces March 6, 2012 1 Object-Oriented S/W Development with Java CSCI 3381 Not all Classes do Objects Make 2 Object-Oriented S/W Development with Java CSCI 3381 Preventing
More informationFinal Examination Semester 3 / Year 2008
Southern College Kolej Selatan 南方学院 Final Examination Semester 3 / Year 2008 COURSE : JAVA PROGRAMMING COURSE CODE : PROG1114 TIME : 2 1/2 HOURS DEPARTMENT : COMPUTER SCIENCE CLASS : CS08-A + CS08-B LECTURER
More informationCOIS Databases
Faculty of Computing and Information Technology in Rabigh COIS 342 - Databases Chapter 4 Enhanced Entity-Relationship and UML Modeling Adapted from Elmasri & Navathe by Dr Samir BOUCETTA First Semester
More informationObject Oriented Programming
Object Oriented Programming Debapriyo Majumdar Programming and Data Structure Lab M Tech CS I Semester I Indian Statistical Institute Kolkata August 7 and 14, 2014 Objects Real world objects, or even people!
More informationCOMP 244. ER-Diagram Notations. Entity-Relationship Diagrams DATABASE CONCEPTS & APPLICATIONS. Database Concepts & Applications 1.
COMP 244 DATABASE CONCEPTS & APPLICATIONS ER-Diagram Notations Attribute Key Attribute Multi-valued attributes Entity-Relationship Diagrams Derived Attribute Weak Entity Identifying Relationship 1 2 Database
More informationHiring a Hourly Internal Employee w/o an Employee ID Number
Before a person can be hired on the internal payroll, a search must be done to verify whether or not they already have an ID number in the system. Once it is determined the person is not in the system,
More informationSolutions for H7. Lecture: Xu Ying Liu
Lecture: Xu Ying Liu 2011 0 Ex13.12 1 // Exercise 13.12 Solution: Date.h 2 // Date class definition. 3 #ifndef DATE_H 4 #define DATE_H 6 #include 7 using namespace std; 8 9 class Date 10 { 11
More informationInheritance. Overview. Chapter 15 & additional topics. Inheritance Introduction. Three different kinds of inheritance
Inheritance Chapter 15 & additional topics Overview Inheritance Introduction Three different kinds of inheritance Changing an inherited member function More Inheritance Details Polymorphism Motivating
More informationName Return type Argument list. Then the new method is said to override the old one. So, what is the objective of subclass?
1. Overriding Methods A subclass can modify behavior inherited from a parent class. A subclass can create a method with different functionality than the parent s method but with the same: Name Return type
More informationCSIS 10A Practice Final Exam Solutions
CSIS 10A Practice Final Exam Solutions 1) (5 points) What would be the output when the following code block executes? int a=3, b=8, c=2; if (a < b && b < c) b = b + 2; if ( b > 5 a < 3) a = a 1; if ( c!=
More informationThe Relational Model (ii)
ICS 321 Fall 2009 The Relational Model (ii) Asst. Prof. Lipyeow Lim Information and Computer Science Department University of Hawaii at Manoa 1 Internet Book Store Example Isbn title author qty price year
More informationIntermediate Programming
Intermediate Programming Lecture 11 UML What is UML? Most people do not think in Java or other programming lanaguges. Therefore, computer scientists have tried to devise more human-oriented ways to represent
More informationCPS122 Lecture: Encapsulation, Inheritance, and Polymorphism
Objectives: CPS122 Lecture: Encapsulation, Inheritance, and Polymorphism Last revised January 23, 2015 1. To review the basic concept of inheritance 2. To introduce Polymorphism. 3. To introduce the notions
More informationCO Java SE 8: Fundamentals
CO-83527 Java SE 8: Fundamentals Summary Duration 5 Days Audience Application Developer, Developer, Project Manager, Systems Administrator, Technical Administrator, Technical Consultant and Web Administrator
More informationLAB 3 Notes. Codd proposed the relational model in 70 Main advantage of Relational Model : Simple representation (relationstables(row,
LAB 3 Notes The Relational Model Chapter 3 In the previous lab we discussed the Conceptual Database Design Phase and the ER Diagram. Today we will mainly discuss how to convert an ER model into the Relational
More informationCS 215 Software Design Sample Midterm Questions
Software Design 1. The administration at Happy Valley School District is redesigning the software that manages information about its students. It has identified an abstract class Student, with two subclasses:
More informationPractice Midterm Exam. Start with the ones that you consider to be easiest, then move to those that may take more time.
CS 102 Fall 2008 Instructor: Audrey St. John Practice Midterm Exam General description There are 4 problems, some subdivided into smaller questions. Do as many as you can, or as much of a bigger problem
More informationHigh Level Database Models
ICS 321 Fall 2011 High Level Database Models Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 9/21/2011 Lipyeow Lim -- University of Hawaii at Manoa 1 Database
More informationContents. I. Classes, Superclasses, and Subclasses. Topic 04 - Inheritance
Contents Topic 04 - Inheritance I. Classes, Superclasses, and Subclasses - Inheritance Hierarchies Controlling Access to Members (public, no modifier, private, protected) Calling constructors of superclass
More informationCOMP 244 DATABASE CONCEPTS & APPLICATIONS
1 COMP 244 DATABASE CONCEPTS & APPLICATIONS Entity-Relationship Diagrams 2 ER-Diagram Notations Attribute Key Attribute Multi-valued attributes Derived Attribute Weak Entity Identifying Relationship 3
More informationM.Com IT (Information Tech.) -Scheme with Practical List Colleges BHARATHIAR UNIVERSITY,COIMBATORE
Page 1 of 7 BHARATHIAR UNIVERSITY,COIMBATORE-641 046 M.Com I T (Information Technology) with Diploma in Services Marketing / Diploma in Capital and Commodity Markets /Diploma in Insurance Management /
More informationInheritance. Chapter 15 & additional topics
Inheritance Chapter 15 & additional topics Overview Inheritance Introduction Three different kinds of inheritance Changing an inherited member function More Inheritance Details Polymorphism Inheritance
More informationJava and OOP. Part 3 Extending classes. OOP in Java : W. Milner 2005 : Slide 1
Java and OOP Part 3 Extending classes OOP in Java : W. Milner 2005 : Slide 1 Inheritance Suppose we want a version of an existing class, which is slightly different from it. We want to avoid starting again
More information1/24/2012. Chapter 7 Outline. Chapter 7 Outline (cont d.) CS 440: Database Management Systems
CS 440: Database Management Systems Chapter 7 Outline Using High-Level Conceptual Data Models for Database Design A Sample Database Application Entity Types, Entity Sets, Attributes, and Keys Relationship
More informationCS 113 PRACTICE FINAL
CS 113 PRACTICE FINAL There are 13 questions on this test. The value of each question is: 1-10 multiple choice (4 pt) 11-13 coding problems (20 pt) You may get partial credit for questions 11-13. If you
More informationIntroduction to Programming System Design CSCI 455x (4 Units)
Introduction to Programming System Design CSCI 455x (4 Units) Description This course covers programming in Java and C++. Topics include review of basic programming concepts such as control structures,
More informationVALLIAMMAI ENGINEERING COLLEGE
VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 603 203 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK B.E. - Electrical and Electronics Engineering IV SEMESTER CS6456 - OBJECT ORIENTED
More informationSRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR
SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR 603203 DEPARTMENT OF COMPUTER SCIENCE & APPLICATIONS QUESTION BANK (2017-2018) Course / Branch : M.Sc CST Semester / Year : EVEN / II Subject Name
More informationCMPT 280 Intermediate Data Structures and Algorithms
The University of Saskatchewan Saskatoon, Canada Department of Computer Science CMPT 280 Intermediate Data Structures and Algorithms Assignment 6 - SOLUTIONS 1 Solutions Written Questions 1. (10 points)
More informationPRACTICAL LIST FOR EVEN SEMESTERS (PGDCA/MCA/MSC (CS))
PRACTICAL LIST FOR EVEN SEMESTERS (PGDCA/MCA/MSC (CS)) SEMSTER 2 nd Programme: PGDCA/MCA/MSC (CS) Course: Practical (Based on MS-06) Code: MS-10 Max Marks: 100 Data Structure and Algorithms (Based on MS-06)
More informationBBM 102 Introduction to Programming II Spring 2017
BBM 102 Introduction to Programming II Spring 2017 Abstract Classes and Interfaces Instructors: Ayça Tarhan, Fuat Akal, Gönenç Ercan, Vahid Garousi Today Abstract Classes Abstract methods Polymorphism
More informationHomework 2. Develop an EER model for the following situation using the EER diagram,
Homework 2 1. An international school of technology has hired you to create a database management system to assist in scheduling classes. After several interviews with the president, you have come up with
More information