diff --git a/Employee.java b/Employee.java index 8ff1fadbb783c5b9a0894e6876f43b7d0a3367b7..9813a19c71a0391a1d967bc965842addfa0c598e 100644 --- a/Employee.java +++ b/Employee.java @@ -3,18 +3,24 @@ public class Employee { public String position; public String description; public String picture; + public String altText; - public Employee(String name, String position, String description, String picture) { + public Employee(String name, String position, String description, String picture, String altText) { this.name = name; this.position = position; this.description = description; this.picture = picture; + this.altText = altText; } public String getName() { return this.name; } + public String getAltText() { + return this.altText; + } + public String getDescription() { return this.description; } diff --git a/GenerateStaff.java b/GenerateStaff.java index 91d7ff313d19ea321fe42422b05ec27bdfb782c7..e0a73081fc913cf3026831419e14e1323a375b4e 100644 --- a/GenerateStaff.java +++ b/GenerateStaff.java @@ -30,6 +30,7 @@ public class GenerateStaff { String description = p.getDescription(); String picture = p.getPicture(); String position = p.getPosition(); + String altText = p.getAltText(); // Create new file File employeeFile = new File("staff/" + name + ".html"); @@ -42,7 +43,7 @@ public class GenerateStaff { outEmployeeFile.println(indent(3) + listStart); outEmployeeFile.println(indent(4) + itemStart + "<span class=\"about\">Position: " + position + "</span>" + itemEnd); outEmployeeFile.println(indent(4) + itemStart + "<span class=\"about\">About: " + description + "</span>" + itemEnd); - outEmployeeFile.println(indent(4) + "<img src=\"" + "../images/staff/" + picture + "\" target=\"_blank\"></img>"); + outEmployeeFile.println(indent(4) + "<img src=\"" + "../images/staff/" + picture + "\" target=\"_blank\" alt=\"" + altText + "\"></img>"); outEmployeeFile.println(indent(3) + listEnd); printFooter(outEmployeeFile); diff --git a/Product.java b/Product.java index b1238246cfd5ff8cc7ebabb822903c2c83eae3af..0916d6feb26ee5467f8222924154131d0a98a0fd 100644 --- a/Product.java +++ b/Product.java @@ -2,12 +2,14 @@ public class Product { public String name; public String description; public String picture; + public String altText; public double price; - public Product(String name, String description, String picture, double price) { + public Product(String name, String description, String picture, String altText, double price) { this.name = name; this.description = description; this.picture = picture; + this.altText = altText; this.price = price; } @@ -15,6 +17,10 @@ public class Product { return this.name; } + public String getAltText() { + return this.altText; + } + public String getDescription() { return this.description; } diff --git a/Products.java b/Products.java index ecbcfc8dbf2238885a31917cf12826407e34a7b0..b639a8130ecc314696537e032966b175001da833 100644 --- a/Products.java +++ b/Products.java @@ -1,6 +1,12 @@ /* check out these products! */ public class Products { /* a good class, but not as good as cse391 */ public Product joshsProduct() { - return new Product("Dirt", "The good stuff", "dirt.jpeg", 0.0); + return new Product( + "Dirt", + "The good stuff", + "dirt.jpeg", + "some normal brown dirt", + 0.0 + ); } } diff --git a/Staff.java b/Staff.java index 62f9494d0af0f1c27a613a3421b6023db62eb692..edccd20ac36afca592b6b7ea4565271663271a7b 100644 --- a/Staff.java +++ b/Staff.java @@ -1,10 +1,22 @@ public class Staff { public Employee faangPup() { - return new Employee("Steve", "Company Pup", "Provides Moral Support", "pup.jpg"); + return new Employee( + "Steve", + "Company Pup", + "Provides Moral Support", + "pup.jpg", + "the goodest boi" + ); } public Employee cjobes() { - return new Employee("Colton", "Lead Naps Analyst", "What do you mean I'm not valuable to the company?", "colton.jpg"); + return new Employee( + "Colton", + "Lead Naps Analyst", + "What do you mean I'm not valuable to the company?", + "colton.jpg", + "Colton smiling with a forest in the background" + ); } }