Create a project in xcode

Assignment Help Programming Languages
Reference no: EM13899

Question 1

Part 1: Conditional Logic

Conditional logic is used within your application to make decisions during the application lifetime. Objective-C is quite typical of other languages in the syntax and structure of conditional logic, though things get more complicated when attempting to determine if two NSObject-based objects are equal. The main syntax elements you have available are the if statement, the switch statement, and the question mark ? known as the ternary operator in the C programming language.

Create a new project in XCode using the Mac OS X/Command Line Tool template.

Use at least one case of each of the following:

if statement using the == operator
if statement using the is Equal To: method
compound logic, using and (&&) or using or (||)
Perform a logical test to see if something is not true.

Part 2: Methods and Parameters

Methods are functions that are defined on a class in order for that class to perform tasks. Often, those tasks involve ivars and properties of the object, and sometimes those tasks require extra information to complete the task properly. This extra information can be passed to the method through parameters.

Create a new project in XCode using the Mac OS X/Command Line Tool template. You can use the same project as you created in the first part of this assignment. Create a custom class that contains at least three public methods and one private method. From the main() method in main.m, create an instance of the class and demonstrate calling the methods.

At the Apple developer site, track down the official Objective-C documentation. Review the section on properties. The Objective-C Programming Language

Question 2 : Complete all parts

Part 1: A Date class

Design a class called Date. The class should store a date in three integers: month, day, and year. There should be member functions to print the date in the following forms:
12/25/2012
December 25, 2012
25 December 2012

Perform the following input validation: Do not accept values for the day greater than 31 or less than 1. Do not accept values for the month greater than 12 or less than 1.

Part 2: A PayRoll class

Design a PayRoll class that has data members for an employee's hourly pay rate, number of hours worked and total pay for the week. Write a program with an array of seven PayRoll objects. The program should ask the user for the number of hours each employee has worked and will then display the amount of gross pay each has earned.
Perform the following input validation: Do not accept values greater than 60 for the number of hours worked.

Part 3: DayOfYear class

Assuming that a year has 365 days, write a class named DayOfYear that takes an integer representing a day of the year and translates it to a string consisting of the month followed by day of the month. For example,

Day 2 would be January 2
Day 32 would be February 1
Day 365 would be December 31

The initializer for the class should take as parameter an integer representing the day of the year, and the class should have a member function print() that prints the day in the month-day format. Test your class by inputting various integers representing days and printing out their representation in the month-day format.

Demonstrate the functionality of all of these classes in one or more driver programs.

Reference no: EM13899

Questions Cloud

Capm and venture capital : CAPM and Venture Capital
Find out the probability : Find out the probability
Managing ashland multicomm services : This question is asking you to compare the likelihood of your getting 4 or more subscribers in a sample of 50 when the probability of a subscription has risen from 0.02 to 0.06.]  Talk about the comparison of probabilities in your explanation.
Adsorption and membrane processes : Adsorption and Membrane Processes
Create a project in xcode : Create a new project in XCode using the Mac OS X/Command Line Tool template
Evaluating the npv for each project : Evaluate the value of a share of Turkish Air's stock.
Mathematics in computing : Write the selection sort algorithm
Write the selection sort algorithm : Write the selection sort algorithm
Create a very simple order system as a web application : Create a very simple Order System as a web application.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Write a program that uses the curve class hierarchy

Write a program that uses the curve class hierarchy. The program should define several different objects, output their area, circumference, etc. It should also use the printcurve function.

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

  Ethics and social responsibility

Ethics and social responsibility at McDonalds

  Discussion: html/css

Discussion: HTML/CSS,  "JavaScript Placement"  Please respond to the following: Compare and contrast the process of adding JavaScript and a Cascading Style Sheet to a Website. Determine if they can be used simultaneously in a page. If so, explain wh..

  Write a paper on memory management

Write a paper on Memory Management

  Writing a class

Build a class for a type called Fraction

  Technical project: sample website project

Technical Project: Sample Website Project , This assignment consists of three (3) sections: a narrative, a storyboard, and a business Website. You must submit all three (3) sections for the completion of this assignment.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd