TweetFollow Us on Twitter

C++ Redux
Volume Number:10
Issue Number:1
Column Tag:Getting Started

Related Info: Color Quickdraw

C++ Redux

Rehashing the basics

By Dave Mark, MacTech Magazine Regular Contributing Author

Note: Source code files accompanying article are located on MacTech CD-ROM or source code disks.

Back in the October ‘93 Getting Started column, we took a look at the basics of object programming using C++. Since the column came out, I’ve gotten tons of feedback, from both C++ novices and experts alike. After sorting through all the comments, I took a few days and did a complete rewrite of the October column and of the corresponding chapter (Chapter 5) in Learn C++ on the Macintosh. If you’ve read the first printing of Learn C++ on the Macintosh (the changes will appear in the second printing) or made your way through the first edition of this column, please take the time to read this new version. As a bonus, this month’s column includes a C++ program that demonstrates the techniques described throughout the text (the October column didn’t include a program).

Objects

There is nothing mysterious about the concept of an object. In C++, an object is any instance of a data type. For example, this line of code:

intmyInt;

declares an int object. This column will teach you how to use C++ to create, destroy and manipulate objects in very powerful ways.

The first object we’ll take a look at is the structure.

The Organizational Power of the Struct

One of the most valuable features shared by C and C++ is the structure. Without the structure, you’d have no way to group data that belonged together. For example, suppose you wanted to implement an employee data base that tracked an employee’s name, employee ID, and salary. You might design a structure that looks like this:

const short kMaxNameSize = 20;

struct Employee
{
 char   name[ kMaxNameSize ];
 long   id;
 float  salary;
};

The great advantage of this structure is that it lets you bundle several pieces of information together under a single name. This concept is known as encapsulation.

For example, if you wrote a routine to print an employee’s data, you could write:

EmployeenewHire;
 •
 •
 •
PrintEmployee( newHire.name, newHire.id, newHire.salary );

Did you notice anything unusual about the declaration of newHire in the preceding code sample? In C, this code would not have compiled. Instead, the declaration would have looked like this:

struct Employee  newHire; /* The C version */

When the C++ compiler sees a structure declaration, it uses the structure name to create a new data type, making it available for future structure declarations.

On the other hand, it would be so much more convenient to pass the data in its encapsulated form:

PrintEmployee( &newHire );

Encapsulation allows you to represent complex information in a more natural, easily accessible form. In the C language, the struct is the most sophisticated encapsulation mechanism available. As you'll soon see, C++ takes encapsulation to a new level.

Encapsulating Data and Functions

While C structures are limited strictly to data, C++ supports structures composed of both data and functions.

Here's an example of a C++ structure declaration:

const short kMaxNameSize = 20;

struct Employee
{
// Data members...
 char   employeeName[ kMaxNameSize ];
 long   employeeID;
 float  employeeSalary;

// Member functions...
 void   PrintEmployee();
};

This example declares a new type named Employee. You can use the Employee type to declare individual Employee objects. Each Employee object is said to be a member of the Employee class.

The Employee class consists of three data fields as well as a function named PrintEmployee(). In C++, a classes’ data fields are known as data members and its functions are known as member functions.

Each Employee object you create gets its own copy of the Employee class data members. All Employee objects share a single set of Employee member functions.

Later in the column, you’ll see how to access an object’s data members and member functions. For now, let’s take a look at the mechanisms C++ provides to create and destroy objects.

Creating an Object

There are two ways to create a new object. The simplest method is to define the object directly, just as you would a local variable:

Employeeemployee1;

This definition creates an Employee object whose name is employee1. employee1 consists of a block of memory large enough to accomodate each of the three Employee data members.

When you create an object by defining it directly, as we did above, memory for the object is allocated when the definition moves into scope. That same memory is freed up when the object drops out of scope.

For example, you might define an object at the beginning of a function:

void  CreateEmployee()
{
 Employee employee1;

 •
 •
 •
}

When the function is called, memory for the object is allocated, right along with the function’s other local objects. When the function exits, the object’s memory is deallocated.

If you want a little more control over when your object is destroyed, take advantage of C++’s new operator.

First, define an object pointer, then use new to allocate the memory for your object. new returns a pointer to the newly created object. Here’s some code that creates an Employee object:

Employee*employeePtr;

employeePtr = new Employee;

The first line of code defines a pointer designed to point to an Employee object. The second line uses new to create an Employee object. new returns a pointer to the newly created Employee.

Accessing an Object’s Members

Once you’ve created an object, you can modify its data members and call its member functions. If you’ve defined the object directly, you’ll refer to its data members using the . operator:

Employeeemployee1;

employee1.employeeSalary = 200.0;

If you’re referencing the object through a pointer, use the -> operator:

Employee*employeePtr;

employeePtr = new Employee;

employeePtr->employeeSalary = 200.0;

To call a member function, use the same technique. If the object was defined directly, you’ll use the . operator:

Employeeemployee1;

employee1.PrintEmployee();

If you’re referencing the object through a pointer, you’ll use the -> operator:

Employee*employeePtr;

employeePtr = new Employee;

employeePtr->PrintEmployee();

The Current Object

In the previous examples, each reference to a data member or member function started with an object or object pointer. Inside a member function, however, the object or object pointer isn’t necessary to refer to the object for which the member function is executing.

For example, inside the PrintEmployee() function, you can refer to the data member employeeSalary directly, without referring to an object or object pointer:

if ( employeeSalary <= 200 )
 cout << "Give this person a raise!!!";

This code is kind of puzzling. What object does employeeSalary belong to? After all, you’re used to saying:

myObject->employeeSalary
instead of just plain:

employeeSalary

The key to this puzzle lies in knowing which object spawned the call of PrintEmployee() in the first place. Although this may not be obvious, a call to a non-static member function must originate with a single object.

Suppose you called PrintEmployee() from a non-Employee function (such as main()). You must precede this call with a reference to an object:

employeePtr->PrintEmployee();

Whenever a member function is called, C++ keeps track of the object used to call the function. This object is known as the current object.

In the call of PrintEmployee() above, the object pointed to by employeePtr is the current object. Whenever this call of PrintEmployee() refers to an Employee data member or function without using an object reference, the current object (in this case, the object pointed to by employeePtr) is assumed.

Suppose PrintEmployee() then called another Employee function. The object pointed to by employeePtr is still considered the current object. A reference to employeeSalary would still refer to the current object’s copy of employeeSalary.

The point to remember is, a non-static member function always starts up with a single object in mind.

The “This” Object Pointer

C++ provides a generic object pointer, available inside any member function, that points to the current object. The generic pointer has the name this. For example, inside every Employee function, the line:

this->employeeSalary = 400;
is equivalent to this line:

employeeSalary = 400;

this is useful when a member function wants to return a pointer to the current object, pass the address of the current object on to another function, or just store the address somewhere. This line of code:

return this;

returns the address of the current object.

Deleting an Object

When you create an object using new, you’ve got to take responsibility for destroying the object at the appropriate time. Just as a C programmer balances a call to malloc() with a call to free(), a C++ programmer balances each use of the new operator with an eventual use of the delete operator. Here’s the syntax:

Employee*employeePtr;

employeePtr = new Employee;

delete employeePtr;

As you’d expect, delete destroys the specified object, freeing up any memory allocated for the object. Note that this freed up memory only includes memory for the actual object and does not include any extra memory you may have allocated.

For example, suppose the object is a structure and one of its data members is a pointer to another structure. When you delete the first structure, the second structure is not deleted.

Writing Member Functions

Once your structure is declared, you’re ready to write your member functions. Member functions behave in much the same way as ordinary functions, with a few small differences. One difference, pointed out earlier, is that a member function has access to the data members and member functions of the object used to call it.

Another difference lies in the function implementation’s title line. Here’s a sample:

void  Employee::PrintEmployee()
{
 cout << "Employee Name:   " << employeeName << "\n";
}

Notice that the function name is preceded by the class name and two colons. This notation is mandatory and tells the compiler that this function is a member of the specified class.

The Constructor Function

Typically, when you create an object, you’ll want to perform some sort of initialization on the object. For instance, you might want to provide initial values for your object’s data members. The constructor function is C++’s built-in initialization mechanism.

The constructor function (or just plain constructor) is a member function that has the same name as the object’s class. For example, the constructor for the Employee class is named Employee(). When an object is created, the constructor for that class gets called.

Consider this code:

Employee*employeePtr;
employeePtr = new Employee;

In the second line, the new operator allocates a new Employee object, then immediately calls the object’s constructor. Once the constructor returns, the address of the new object is assigned to employeePtr.

This same scenario holds true in this declaration:

Employeeemployee1;

As soon as the object is created, its constructor is called.

Here’s our Employee struct declaration with the constructor declaration added in:

const short kMaxNameSize = 20;

struct Employee
{
// Data members...
 char   employeeName[ kMaxNameSize ];
 long   employeeID;
 float  employeeSalary;

// Member functions...
 Employee();
 void   PrintEmployee();
};

Notice that the constructor is declared without a return value. Constructors never return a value.

Here’s a sample constructor:

Employee::Employee()
{
 employeeSalary = 200.0;
}

This is proper form.

Adding Parameters to Your Constructor

If you like, you can add parameters to your constructor. Constructor parameters are typically used to provide initial values for the object’s data members. Here’s a new version of the Employee() constructor:

Employee::Employee( char *name, long id, float salary )
{
 strncpy( employeeName, name, kMaxNameSize );

 employeeName[ kMaxNameSize - 1 ] = '\0';

 employeeID = id;
 employeeSalary = salary;
}

The constructor copies the three parameter values into the corresponding data members.

The object that was just created is always the constructor’s current object. In other words, when the constructor refers to an Employee data member, such as employeeName or employeeSalary, it is referring to the copy of that data member in the newly created object.

This line of code supplies the new operator with a set of parameters to pass on to the constructor:

employeePtr = new Employee( "Dave Mark", 1000, 200.0 );

This line of code does the same thing without using new:

Employeeemployee1( "Dave Mark", 1000, 200.0 );

As you’d expect, this code creates an object named employee1 by calling the Employee constructor, passing it the three specified parameters.

Just for completeness, here’s the class declaration again, showing the new constructor:

struct Employee
{
// Data members...
 char   employeeName[ kMaxNameSize ];
 long   employeeID;
 float  employeeSalary;

// Member functions...
 Employee( char *name, long id, float salary );
 void   PrintEmployee();
};

The Destructor Function

The destructor function is called for you, just as the constructor is. Unlike the constructor, however, the destructor is called when an object in its class is deleted or goes out of scope. Use the destructor to clean up after your object before it goes away. For instance, you might use the destructor to deallocate any additional memory your object may have allocated.

The destructor function is named by a tilda character (~) followed by the class name. The destructor for the Employee class is named ~Employee(). The destructor has no return value and no parameters.

Here’s a sample destructor:

Employee::~Employee( void )
{
 cout << "Deleting employee #" << employeeID << "\n";
}

If you created your object using new, the destructor is called when you use delete:

Employee*employeePtr;

employeePtr = new Employee;

delete employeePtr;

If your object was defined directly, the destructor is called just before the object is destroyed. For example, if the object was declared at the beginning of a function, the destructor is called when the function exits.

Here’s an updated Employee class declaration showing the constructor and destructor:

struct Employee
{
// Data members...
 char   employeeName[ kMaxNameSize ];
 long   employeeID;
 float  employeeSalary;

// Member functions...
 Employee( char *name, long id, float salary );
 ~Employee();
 void   PrintEmployee();
};

Access Priveleges

When you declare a class, you need to decide which data members and functions you’d like to make available to the rest of your program. C++ gives you the power to hide a classes’ functions and data from all the other functions in your program, or allow access to a select few.

For example, consider the Employee class we’ve been working with throughout the column. In the current model, an Employee’s name is stored in a single array of chars. Suppose you wrote some code that created a new Employee, specifying the name, id, and salary, then later in your program you decided to modify the Employee’s name, perhaps adding a middle name provided while your program was running.

With the current design, you could access and modify the Employee’s employeeName data member from anywhere in your program. As time passes and your program becomes more complex, you might find yourself accessing employeeName from several places in your code.

Now imagine what happens when you decide to change the implementation of employeeName. For example, you might decide to break the single employeeName into three separate data members, one each for the first, middle and last names. Imagine the hassle of having to pore through your code finding and modifying every single reference to employeeName, making sure you adhere to the brand new model.

C++ allows you to hide the implementation details of a class (the specific type of each data member, for example), funneling all access to the implementation through a specific set of interface routines. By hiding the implementation details, the rest of your program is forced to go through the interface routines your class provides. That way, when you change the implementation, all you have to do is make whatever changes are necessary to the classes interface, without having to modify the rest of your program.

The mechanism C++ provides to control access to your classes’ implementation is called the access specifier.

Access Specifiers

C++ allows you to assign an access specifier to any of a classes’ data members and member functions. The access specifier defines which of your program’s functions have access to the specified data member or function. The access specifier must be one of public, private, or protected.

If a data member or function is marked as private, access to it is limited to member functions of the same class (or, as you’ll see later in the chapter, to classes or member functions marked as a friend of the class).

On the flip side, the public specifier gives complete access to the member function or data member, limited only by scope.

By default, the data members and member functions of a class declared using the struct keyword are all public. By adding the private keyword to our class declaration, we can limit access to the Employee data members, forcing the outside world to go through the provided member functions:

struct Employee
{
// Data members...
 private:
 char   employeeName[ kMaxNameSize ];
 long   employeeID;
 float  employeeSalary;

// Member functions...
 public:
 Employee( char *name, long id, float salary );
 ~Employee();
 void   PrintEmployee();
};

Once the compiler encounters an access specifier, all data members and functions that follow are marked with that code, at least until another code is encountered. In this example, the three data members are marked as private and the three member functions are marked as public.

The class Keyword

So far, all of our classes have been created using the struct keyword. You can also create classes, using the exact same syntax, substituting the keyword class for struct. The only difference is, the members of a struct are all public by default and the members of a class are all private by default.

Why use class instead of struct? If you start with a struct, you give the world complete access to your class members unless you intentionally limit access using the appropriate access specifiers. If you start with a class, access to your class members is limited right from the start. You have to intentionally allow access by using the appropriate access specifiers.

For the remainder of this book, we’ll use the class keyword to declare our classes. Here’s the new version of the Employee class:

class Employee
{
// Data members...
 private:
 char   employeeName[ kMaxNameSize ];
 long   employeeID;
 float  employeeSalary;

// Member functions...
 public:
 Employee( char *name, long id, float salary );
 ~Employee();
 void   PrintEmployee();
};

Notice that the private access specifier is still in place. Since the members of a class-based class are private by default, the private access specifier is not needed here, but it does make the code a little easier to read. The public access specifier is necessary, however, to give the rest of the program access to the Employee member functions.

With all that we’ve covered so far, we’re about ready for our next sample program. Employee.cp brings these concepts together.

An Object Programming Example

Create a new folder named Employee in your development folder. Then, launch Symantec C++ and create a new project, named Employee.Π, in the Employee folder. Next, select Add Files... from the Project menu and navigate into the Symantec C++ for Macintosh folder and then into the Standard Libraries folder. You’ll be adding three libraries to this project. Add the ANSI++, CPlusLib, and IOStreams libraries to the project. When the libraries appear in the project window, drag CPlusLib and IOStreams to a new segment (just click on them, one at a time, and drag them towards the bottom of the project window. The Project Manager will create the new segment for you automatically).

Next, create a new source code file and save it as Employee.cp inside the Employee folder. Add the file to the project. If it doesn’t get added to the same segment as CPlusLib and IOStreams, drag it into that segment. ANSI++ should be in one segment and the three other files should be in a different segment.

Here’s the source code for Employee.cp:

/* 1 */
#include <iostream.h>
#include <string.h>

const short kMaxNameSize = 20;

class Employee
{
// Data members...
 private:
 char   employeeName[ kMaxNameSize ];
 long   employeeID;
 float  employeeSalary;

// Member functions...
 public:
 Employee( char *name, long id, float salary );
 ~Employee();
 void   PrintEmployee();
};

Employee::Employee( char *name, long id, float salary )
{
 strncpy( employeeName, name, kMaxNameSize );

 employeeName[ kMaxNameSize - 1 ] = '\0';

 employeeID = id;
 employeeSalary = salary;
 
 cout << "Creating employee #" << employeeID << "\n";
}

Employee::~Employee()
{
 cout << "Destroying employee #" << employeeID << "\n";
}

void  Employee::PrintEmployee()
{
 cout << "-----\n";
 cout << "Name:   " << employeeName << "\n";
 cout << "ID:     " << employeeID << "\n";
 cout << "Salary: " << employeeSalary << "\n";
 cout << "-----\n";
}

intmain()
{
 Employee employee1( "Dave Mark", 1, 200.0 );
 Employee *employee2;

 employee2 = new Employee( "Steve Baker", 2, 300.0 );

 employee1.PrintEmployee();
 employee2->PrintEmployee();

 delete employee2;
 
 return 0;
}

Save your source code, and select Run from the Project menu. Symantec C++ will compile and run your program. Here’s what the output should look like:

/* 2 */
Creating employee #1
Creating employee #2
-----
Name:   Dave Mark
ID:     1
Salary: 200
-----
-----
Name:   Steve Baker
ID:     2
Salary: 300
-----
Destroying employee #2
Destroying employee #1

Let’s take a look at the source code.

The employee Source Code

As you look through employee.cp, you should see some familiar sights. This program takes the Employee class described throughout this column through its paces.

The first thing you’ll notice is the two include files <iostream.h> which is like the C++ version of <stdio.h> (we’ll talk about the iostream library in a later column) and <string.h>, which is needed for the call to strncpy() later in the program:

#include <iostream.h>
#include <string.h>

The const kMaxNameSize and the Employee class declaration are identical to those presented earlier in the column. Notice that the data members are all marked as private (unnecessary, but it does make the code easier to read) while the member functions are marked as public.

const short kMaxNameSize = 20;

class Employee
{
// Data members...
 private:
 char   employeeName[ kMaxNameSize ];
 long   employeeID;
 float  employeeSalary;

// Member functions...
 public:
 Employee( char *name, long id, float salary );
 ~Employee();
 void   PrintEmployee();
};

The Employee class has three member functions: a constructor, a destructor, and a utility routine named PrintEmployee(). The constructor, Employee(), uses its three parameters to initialize each of the Employee data members.

Employee::Employee( char *name, long id, float salary )
{

To avoid a possible non-terminated string in the name parameter, we’ll use strncpy() to copy all the bytes from name into employeeName. strncpy() copies kMaxNameSize characters from name to employeeName. If the name string is less than kMaxNameSize characters long, strncpy() will also copy over the null-terminator.

 strncpy( employeeName, name, kMaxNameSize );

If name is not null-terminated or is kMaxNameSize bytes long or longer, we’ll stick a null-terminator at the very end of employeeName to ensure that one exists.

 employeeName[ kMaxNameSize - 1 ] = '\0';

Finally, we’ll copy the remaining two parameters into their respective data members.

 employeeID = id;
 employeeSalary = salary;

Once the data members are initialized, the constructor sends a message to the console, telling us which Employee object was just created.

 cout << "Creating employee #" << employeeID << "\n";
}

Since no extra memory was allocated, there’s not a whole lot for the destructor to do. Just like the constructor, the destructor sends a message to the console, telling us which Employee object will be deleted.

Employee::~Employee()
{
 cout << "Deleting employee #" << employeeID << "\n";
}

PrintEmployee() displays the contents of the three data members of the current object:

void  Employee::PrintEmployee()
{
 cout << "-----\n";
 cout << "Name:   " << employeeName << "\n";
 cout << "ID:     " << employeeID << "\n";
 cout << "Salary: " << employeeSalary << "\n";
 cout << "-----\n";
}

main() is the control center, where all the action is. First, we define an Employee object, passing three parameters to the constructor:

intmain()
{
 Employee employee1( "Dave Mark", 1, 200.0 );

As the Employee constructor is called, it displays the following line on the console:

Creating employee #1

Next, an Employee object pointer is defined:

 Employee *employee2;

This time, new is used to create a second Employee object:

 employee2 = new Employee( "Steve Baker", 2, 300.0 );

Once again, the Employee constructor is called, sending another line to the console:

Creating employee #2

Now, both objects are used to call the PrintEmployee() member function. employee1 is an object and uses the . operator to access its member function. Since employee2 is a pointer and uses the -> operator to access the PrintEmployee() function:

 employee1.PrintEmployee();
 employee2->PrintEmployee();

These two calls result in the following output:

-----

Name: Dave Mark

ID: 1

Salary: 200

-----

-----

Name: Steve Baker

ID: 2

Salary: 300

-----

Next, the object pointed to by employee2 is deleted:

 delete employee2;
}

This causes employee2’s destructor to be called, resulting in this line of output:

Destroying employee #2

Finally, main() exits and all of main()’s local variables (including employee1) are deallocated. As soon as employee1 was deallocated, its destructor was called, resulting in a final line of output being sent to the console:

Destroying employee #1

Notice that employee1’s destructor wasn’t called till main() had exited.

Take another look at your program’s output. If you like, go run the program again. Notice that every single line of output was produced by an object’s member function. Although you did call PrintEmployee() directly, the constructor and destructor functions were called for you when you created and deleted an object.

Consider the line of code used to delete an Employee object:

delete employee1;

This line of code does not contain a function call. It does not contain code that prints information to the console. Even so, a function call was made (the destructor function, called for you). A line of output was sent to the console.

The point here is that there’s action going on behind the scenes. Stuff happens automatically. You delete an object, the destructor gets called for you. This might seem like a minor point, but this is your first peek at the power of object programming.

Till Next Month

Interested in more C++ coverage? Let me know. You can write to me c/o MacTech magazine at the addresses listed on page 2 of the magazine (Under the heading How to communicate with Xplain Corporation). In the meantime, I’ll go back to the Mac Toolbox and more Color QuickDraw in next month’s column. See you then...

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Netflix Games expands its catalogue with...
It is a good time to be a Netflix subscriber this month. I presume there's a good show or two, but we are, of course, talking about their gaming service that seems to be picking up steam lately. May is adding five new titles, and there are some... | Read more »
Seven Knights Idle Adventure drafts in a...
Seven Knights Idle Adventure is opening up more stages, passing the 15k mark, and players may find themselves in need of more help to clear these higher stages. Well, the cavalry has arrived with the introduction of the Legendary Hero Iris, as... | Read more »
AFK Arena celebrates five years of 100 m...
Lilith Games is quite the behemoth when it comes to mobile games, with Rise of Kingdom and Dislyte firmly planting them as a bit name. Also up there is AFK Arena, which is celebrating a double whammy of its 5th anniversary, as well as blazing past... | Read more »
Fallout Shelter pulls in ten times its u...
When the Fallout TV series was announced I, like I assume many others, assumed it was going to be an utter pile of garbage. Well, as we now know that couldn't be further from the truth. It was a smash hit, and this success has of course given the... | Read more »
Recruit two powerful-sounding students t...
I am a fan of anime, and I hear about a lot that comes through, but one that escaped my attention until now is A Certain Scientific Railgun T, and that name is very enticing. If it's new to you too, then players of Blue Archive can get a hands-on... | Read more »
Top Hat Studios unveils a new gameplay t...
There are a lot of big games coming that you might be excited about, but one of those I am most interested in is Athenian Rhapsody because it looks delightfully silly. The developers behind this project, the rather fancy-sounding Top Hat Studios,... | Read more »
Bound through time on the hunt for sneak...
Have you ever sat down and wondered what would happen if Dr Who and Sherlock Holmes went on an adventure? Well, besides probably being the best mash-up of English fiction, you'd get the Hidden Through Time series, and now Rogueside has announced... | Read more »
The secrets of Penacony might soon come...
Version 2.2 of Honkai: Star Rail is on the horizon and brings the culmination of the Penacony adventure after quite the escalation in the latest story quests. To help you through this new expansion is the introduction of two powerful new... | Read more »
The Legend of Heroes: Trails of Cold Ste...
I adore game series that have connecting lore and stories, which of course means the Legend of Heroes is very dear to me, Trails lore has been building for two decades. Excitedly, the next stage is upon us as Userjoy has announced the upcoming... | Read more »
Go from lowly lizard to wicked Wyvern in...
Do you like questing, and do you like dragons? If not then boy is this not the announcement for you, as Loongcheer Game has unveiled Quest Dragon: Idle Mobile Game. Yes, it is amazing Square Enix hasn’t sued them for copyright infringement, but... | Read more »

Price Scanner via MacPrices.net

Apple introduces the new M4-powered 11-inch a...
Today, Apple revealed the new 2024 M4 iPad Pro series, boasting a surprisingly thin and light design that pushes the boundaries of portability and performance. Offered in silver and space black... Read more
Apple introduces the new 2024 11-inch and 13-...
Apple has unveiled the revamped 11-inch and brand-new 13-inch iPad Air models, upgraded with the M2 chip. Marking the first time it’s offered in two sizes, the 11-inch iPad Air retains its super-... Read more
Apple discontinues 9th-gen iPad, drops prices...
With today’s introduction of the new 2024 iPad Airs and iPad Pros, Apple has (finally) discontinued the older 9th-generation iPad with a home button. In response, they also dropped prices on 10th-... Read more
Apple AirPods on sale for record-low prices t...
Best Buy has Apple AirPods on sale for record-low prices today starting at only $79. Buy online and choose free shipping or free local store pickup (if available). Sale price for online orders only,... Read more
13-inch M3 MacBook Airs on sale for $100 off...
Best Buy has Apple 13″ MacBook Airs with M3 CPUs in stock and on sale today for $100 off MSRP. Prices start at $999. Their prices, along with Amazon’s, are the lowest currently available for new 13″... Read more
Amazon is offering a $100 discount on every 1...
Amazon has every configuration and color of Apple’s 13″ M3 MacBook Air on sale for $100 off MSRP, now starting at $999 shipped. Shipping is free: – 13″ MacBook Air (8GB RAM/256GB SSD): $999 $100 off... Read more
Sunday Sale: Take $150 off every 15-inch M3 M...
Amazon is now offering a $150 discount on every configuration and color of Apple’s M3-powered 15″ MacBook Airs. Prices start at $1149 for models with 8GB of RAM and 256GB of storage: – 15″ M3 MacBook... Read more
Apple’s 24-inch M3 iMacs are on sale for $150...
Amazon is offering a $150 discount on Apple’s new M3-powered 24″ iMacs. Prices start at $1149 for models with 8GB of RAM and 256GB of storage: – 24″ M3 iMac/8-core GPU/8GB/256GB: $1149.99, $150 off... Read more
Verizon has Apple AirPods on sale this weeken...
Verizon has Apple AirPods on sale for up to 31% off MSRP on their online store this weekend. Their prices are the lowest price available for AirPods from any Apple retailer. Verizon service is not... Read more
Apple has 15-inch M2 MacBook Airs available s...
Apple has clearance, Certified Refurbished, 15″ M2 MacBook Airs available starting at $1019 and ranging up to $300 off original MSRP. These are the cheapest 15″ MacBook Airs for sale today at Apple.... Read more

Jobs Board

IN6728 Optometrist- *Apple* Valley, CA- Tar...
Date: May 8, 2024 Brand: Target Optical Location: Apple Valley, CA, US, 92308 **Requisition ID:** 824398 At Target Optical, we help people see and look great - and Read more
Nurse Anesthetist - *Apple* Hill Surgery Ce...
Nurse Anesthetist - Apple Hill Surgery Center Location: WellSpan Medical Group, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Apply Now Read more
LPN-Physician Office Nurse - Orthopedics- *Ap...
LPN-Physician Office Nurse - Orthopedics- Apple Hill Location: WellSpan Medical Group, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Apply Read more
Supervisor/Therapist Rehabilitation Medicine...
Supervisor/Therapist Rehabilitation Medicine - Apple Hill (Outpatient Clinic) - Day Location: York Hospital, York, PA Schedule: Full Time Sign-On Bonus Eligible Read more
BBW Sales Support- *Apple* Blossom Mall - Ba...
BBW Sales Support- APPLE BLOSSOM MALL Brand: Bath & Body Works Location: Winchester, VA, US Location Type: On-site Job ID: 04388 Job Area: Store: Sales and Support Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.