关键词 > ST1(4483)

ST1(4483)Major Assignment COLT2 2022

发布时间:2022-08-12

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ST1(4483)Major Assignment

COLT2 2022

Part A

Project 1: Payroll Calculator (Console & GUI Application Both)

●   Learning Objective: Using Basic Python Input Output and Arithmetic Statements

Problem Description:

Write a Python program (Console and GUI) that reads the following information from user, and prints a payroll statement:

Employee’s name (e.g., Smith)

Number of hours worked in a week (e.g., 10)

Hourly pay rate (e.g., 60.75)

ATO tax withholding rate (e.g., 30%)

Medicare Levy rate (e.g., 2%)

Here is some sample acceptance test data:

<Output>

Enter employee's name: John Smith

Enter number of hours worked in a week: 10

Enter hourly pay rate: 60.75

Enter ATO tax withholding rate: 0.30

Enter Medicare Levy rate: 0.02

Employee Name: Smith

Hours Worked:  10.0

Pay Rate:  $60.75

Gross Pay:  $607.50

Deductions:

ATO tax (30.0%):  $182.25

Medicare Levy (2.0%):  $12.15

Total Deduction12:  $194.4

Net Pay:   $413.10

<End Output>

Project 2: Restaurant Selector (Console & GUI Application Both)

●   Learning Objective: Using Python Conditional and Branching Statements Problem Description:

You have a group of friends coming to visit for your high school reunion, and you want to take them out to eat at a local restaurant. You are not sure if any of them have dietary restrictions, but your restaurant choices are as follows:

●   Joes Gourmet BurgersVegetarian: No, Vegan: No, Gluten-Free: No

●   Main Street Pizza CompanyVegetarian: Yes, Vegan: No, Gluten-Free: Yes

●   Corner Café—Vegetarian: Yes, Vegan: Yes, Gluten-Free: Yes

●   Mamas Fine ItalianVegetarian: Yes, Vegan: No, Gluten-Free: No

●   The Chefs KitchenVegetarian: Yes, Vegan: Yes, Gluten-Free: Yes

Write a Python Console and GUI program that asks whether any members of your party are vegetarian, vegan, or gluten-free, to which then displays only the restaurants to which you     may take the group.

Here is an example of the program’s output:

 

Here is another example of the program’s output:

 

Project 3: Population Tracker: (Console & GUI Application Both)

●   Learning Objective: Using Python Repetition and Loop Statements Problem Description

Write  a  Python  Console  &  GUI   both program that  predicts the  approximate  size  of a

population of organisms.

The application should use text boxes to allow the user to enter the following information:

o starting number of organisms,

o the average daily population increase (as a percentage), and

o the number of days the organisms will be left to multiply.

For example, assume the user enters the following values:

Starting number of organisms: 2

Average daily increase: 30%

Number of days to multiply: 10

The program should display the following table of data

 

Project 4: Password Checker (Console & GUI Application Both)

●   Learning Objective: Using Python Methods and Functions

Problem Description:

Some Websites impose certain rules for passwords, involving use of certain numbers and special characters.

Write a Python Console and GUI program that prompts the user to enter a password and     displays "valid password" if the rule is follows rules of the company, or "invalid password" otherwise.

Write a method or a function for implementing the password checking rules for the method/function as follows:

●   A password must have at least eight characters.

●   A password must consist of only letters and digits.

●   A password must contain at least two digits.

Samp1e 1

Enter a string for password: wewew43x

valid password

Samp1e 2

Enter a string for password: 343a

invalid password

Project 5: Turtle Graphics

●   Objective: Using Turtle Graphics Class and its Methods

Problem Description

Write a Python program using Turtle graphics library, that displays a STOP sign, as shown in Figure below. The hexagon needs to be in red and the text needs to be in white colour.

 

Part B

Project 1: Video Time Logger (Console or GUI)

●   Learning Objective: Working with

Files in Python Problem Description:

Kevin  is  a  freelance  video  producer  who  makes  TV  commercials  for  local businesses. When he makes a commercial, he usually films several short videos. Later, he puts these short videos together to make the final commercial. He has asked you to write the following two programs.

1.   A program that allows him to enter the running time (in seconds) of each short video in a project. The running times are saved to a file.                  A successful test run for this program would be as shown below:

 

A program that reads the contents of the file, displays the running times, and then displays the total running time of all the segments. A successful test run for this program would be as shown below:

 

Project 2: Fitness Tracker (Console and GUI Both)

●   Learning Objective: Using Python Lists,

Collections and Files

●   Problem Description:

A Personal Fitness Tracker is a wearable device that tracks your physical activity, calories burned, heart rate, sleeping patterns, and so on. One common physical activity that most of these devices track is the number of steps you take each day.

o The file steps.txt” at the following web link contains the number of steps a person has taken each day for a year.

o There are 365 lines in the file, and each line contains the number of steps taken during a day. (The first line is the number of steps taken on January 1st, the second line is the number of steps taken on January 2nd, and so forth.)

o Write a program that reads the file, then displays the average number of steps taken for each month.

o (The data is from a year that was not a leap year, so February has

28 days.)

https://drive.google.com/file/d/1fBVZlrVC69MMkN-

y1ICdUk2JVt4ia4L0/view?usp=sharing

A successful test run of the program is as shown in the screenshot below:

 

Project 3: Employee Management System (GUI

Application)

●   Learning Objective: Using Python

Classes and Objects, Inheritance and

Polymorphism

Problem Description: GUI Program

In this problem, you will develop an employee management system using Python. Here are the brief requirements of the program:

1.   Write  a  class  named  Employee,  that  holds  information  about  each employee in attributes such as name, ID number, department, and job title.


2.   Once you have written the class, Draw the UML diagram, and write a program that  creates  three  objects  of employee  class,  with  following information and displays their details.

Name

ID Number

Department

Job Title

Susanna Myer

47899

Accounting

Vice President

Mark Joseph

39119

Info Tech

Programmer

Joyce Roberts

81774

Manufacturing

Engineer

3.   Create a new class named ShiftEmployee, that is a subclass of Employee class. The shift employee has additional attributes in addition to name, ID number, Department and Job Title. The additional attributes are:

-    Shift number (an integer, such as 1,2, or 3)

-    Hourly pay rate

The workday is divided into two shifts: day and night. The shift attribute will hold an integer value representing the shift that the employee works. The day shift is shift 1 and night shift is shift 2.

4.   Once you have written the classes, write a program that creates an object of ShiftEmployee class and prompts the user to enter data for each of the object’s data attributes. Store the data in the object, then use the object’s accessor and mutator methods to retrieve it and display it on the screen. Demonstrate the ShiftEmployee class by creating atleast 2 shift employee objects.

5.   Create  another  new  class  named  Contractor,  that  is  a  subclass  of Employee class. The contractor has additional attributes in  addition to name, ID number, Department and Job Title. The additional attributes are:

a.   Contract End Date

b.   Australian Business Number (ABN)

c.   Fixed Contract Salary until the

end of contract Demonstrate this class by

creating 2 contractor objects.